From ec501377d225605e048335b223d616eced5d37df Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 28 Oct 2022 13:09:26 -0700 Subject: [PATCH 1/4] fix: use * for test plugin engines This removes the need to update this version with every version change. --- test/unit/node/test-plugin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/node/test-plugin/package.json b/test/unit/node/test-plugin/package.json index 817a883e9ef4..0247d60beefb 100644 --- a/test/unit/node/test-plugin/package.json +++ b/test/unit/node/test-plugin/package.json @@ -3,7 +3,7 @@ "name": "test-plugin", "version": "1.0.0", "engines": { - "code-server": "^4.8.1" + "code-server": "*" }, "main": "out/index.js", "devDependencies": { From b62cee4bc5784e6dd2d14bf06d11772ad7d28575 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 28 Oct 2022 13:22:30 -0700 Subject: [PATCH 2/4] refactor: use npm-package in release assets This adds a new job to `release.yaml` to upload the `npm-package` to the release assets which will also allow us to download it in the `publish.yaml` workflow. --- .github/workflows/publish.yaml | 14 ++++++-------- .github/workflows/release.yaml | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 569a9384d4b2..5bbc39292fb4 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -28,15 +28,13 @@ jobs: id: version run: echo "::set-output name=version::$(jq -r .version package.json)" - - name: Download artifact - uses: dawidd6/action-download-artifact@v2 - id: download + - name: Download npm package from release artifacts + uses: robinraju/release-downloader@v1.5 with: - branch: release/v${{ steps.version.outputs.version }} - workflow: build.yaml - workflow_conclusion: completed - name: "npm-package" - path: release-npm-package + repository: "coder/code-server" + tag: v${{ steps.version.outputs.version }} + fileName: "npm-package" + out-file-path: "release-npm-package" - name: Publish npm package and tag with "latest" run: yarn publish:npm diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 61ec8a5bae11..91d536deeaf2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -249,3 +249,24 @@ jobs: draft: true discussion_category_name: "📣 Announcements" files: ./release-packages/* + + npm-package: + name: Upload npm package + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Download artifacts + uses: dawidd6/action-download-artifact@v2 + id: download + with: + branch: ${{ github.ref }} + workflow: build.yaml + workflow_conclusion: completed + check_artifacts: true + name: npm-package + + - uses: softprops/action-gh-release@v1 + with: + draft: true + discussion_category_name: "📣 Announcements" + files: ./npm-package From 89eae59e9bbbbdce622dd72308b70acac28cbd9a Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 28 Oct 2022 13:25:32 -0700 Subject: [PATCH 3/4] docs: update release instructions --- docs/MAINTAINING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md index 3300cc0d62b0..6956bb669b31 100644 --- a/docs/MAINTAINING.md +++ b/docs/MAINTAINING.md @@ -141,8 +141,7 @@ changelog](https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS). ### Publishing a release -1. Create a new branch called `release/v0.0.0` (replace 0s with actual version aka v4.5.0) - 1. If you don't do this, the `npm-brew` GitHub workflow will fail. It looks for the release artifacts under the branch pattern. +1. Create a new branch called `release` 1. Run `yarn release:prep` 1. Bump chart version in `Chart.yaml`. 1. Summarize the major changes in the `CHANGELOG.md` From 2806d395d3a92c4c64449f9d55c50b0dfd712eca Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 28 Oct 2022 15:13:50 -0700 Subject: [PATCH 4/4] fixup!: use package.tar.gz --- .github/workflows/publish.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5bbc39292fb4..a5bf2d11c77f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,7 +33,7 @@ jobs: with: repository: "coder/code-server" tag: v${{ steps.version.outputs.version }} - fileName: "npm-package" + fileName: "package.tar.gz" out-file-path: "release-npm-package" - name: Publish npm package and tag with "latest" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 91d536deeaf2..2d61cc07dc2b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -269,4 +269,4 @@ jobs: with: draft: true discussion_category_name: "📣 Announcements" - files: ./npm-package + files: ./package.tar.gz