Skip to content

Commit b62cee4

Browse files
committed
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.
1 parent ec50137 commit b62cee4

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

.github/workflows/publish.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ jobs:
2828
id: version
2929
run: echo "::set-output name=version::$(jq -r .version package.json)"
3030

31-
- name: Download artifact
32-
uses: dawidd6/action-download-artifact@v2
33-
id: download
31+
- name: Download npm package from release artifacts
32+
uses: robinraju/[email protected]
3433
with:
35-
branch: release/v${{ steps.version.outputs.version }}
36-
workflow: build.yaml
37-
workflow_conclusion: completed
38-
name: "npm-package"
39-
path: release-npm-package
34+
repository: "coder/code-server"
35+
tag: v${{ steps.version.outputs.version }}
36+
fileName: "npm-package"
37+
out-file-path: "release-npm-package"
4038

4139
- name: Publish npm package and tag with "latest"
4240
run: yarn publish:npm

.github/workflows/release.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,24 @@ jobs:
249249
draft: true
250250
discussion_category_name: "📣 Announcements"
251251
files: ./release-packages/*
252+
253+
npm-package:
254+
name: Upload npm package
255+
runs-on: ubuntu-latest
256+
timeout-minutes: 15
257+
steps:
258+
- name: Download artifacts
259+
uses: dawidd6/action-download-artifact@v2
260+
id: download
261+
with:
262+
branch: ${{ github.ref }}
263+
workflow: build.yaml
264+
workflow_conclusion: completed
265+
check_artifacts: true
266+
name: npm-package
267+
268+
- uses: softprops/action-gh-release@v1
269+
with:
270+
draft: true
271+
discussion_category_name: "📣 Announcements"
272+
files: ./npm-package

0 commit comments

Comments
 (0)