refactor(ci): fix npm workflows (#4797)

* feat: refactor npm workflows to use download-artifact

This refactors the npm workflows to use the download-artifact GitHub Action. We
had problems in the past with our download_artifact custom bash function. This
also fixes an issue where we weren't downloading the correct artifacts when
publishing beta and dev tags to npm.

* fixup: remove unused env var

* fixup! add download-artifcat to npm-brew"

* fixup! remove unnecessary code comment

* fixup! move NPM_ENVIRONMENT logic to script
This commit is contained in:
Joe Previte
2022-02-03 13:54:36 -07:00
committed by GitHub
parent 79412eb137
commit fd643dcbc3
5 changed files with 95 additions and 88 deletions

View File

@@ -16,13 +16,18 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
id: download
with:
name: "npm-package"
path: release-npm-package
- name: Publish npm package and tag with "latest"
run: yarn publish:npm
env:
ENVIRONMENT: "production"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: "latest"
NPM_ENVIRONMENT: "production"
homebrew:
# The newest version of code-server needs to be available on npm when this runs