From 35f4263f88d48457c82bdff09952a335ffa27ad6 Mon Sep 17 00:00:00 2001 From: michaelangrivera Date: Tue, 7 Nov 2023 17:49:12 -0500 Subject: [PATCH] try using github releases instead --- .github/workflows/pre-release.yaml | 52 ++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 30 ++++++++--------- package.json | 5 ++- 3 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/pre-release.yaml diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml new file mode 100644 index 0000000..89b23fc --- /dev/null +++ b/.github/workflows/pre-release.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 45cbc67..38d35b4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 @@ -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 diff --git a/package.json b/package.json index e7c2232..3926b7e 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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": [