Skip to content

Commit

Permalink
try using github releases instead
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelangeloio committed Nov 7, 2023
1 parent c316587 commit 35f4263
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 19 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Pre-Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'

- name: Install Bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install wasm-pack
uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa
with:
version: 'latest'

- name: Install dependencies
run: bun install

- name: Build
run: bun run vscode:package

- uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "vscode-canary"
prerelease: true
title: "VsCode Dev Build"
files: |
LICENSE.txt
*.vsix
30 changes: 14 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ name: Release

on:
push:
branches:
- main
tags:
- "vscode-v*"

jobs:
release:
permissions:
actions: read
contents: write
pull-requests: write
issues: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -42,13 +37,16 @@ jobs:
- name: Install dependencies
run: bun install

- name: Create Release Pull Request or Publish to Vscode Marketplace
uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@65512ae7dcf96159b51fdd7ed73eb17d5cacad33
with:
title: Release Tracking
publish: bun run release
version: bun run version-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
pat: ${{ secrets.VSCE_PAT }}
registryUrl: https://marketplace.visualstudio.com

- uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE.txt
*.vsix
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
}
],
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@types/mocha": "^9.1.0",
"@types/node": "^16.18.34",
"@typescript-eslint/eslint-plugin": "^6.9.1",
Expand Down Expand Up @@ -75,8 +74,8 @@
"compile": "bun run build.ts",
"watch": "bun run --watch build.ts",
"build": "bun run build.ts",
"release": "vsce publish",
"version-packages": "changeset version"
"vscode:release": "vsce publish",
"vscode:package": "vsce package"
},
"types": "index.d.ts",
"workspaces": [
Expand Down

0 comments on commit 35f4263

Please sign in to comment.