Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 4f3073b

Browse files
committed
Move NPM publish step to separate job again
1 parent d5d4950 commit 4f3073b

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,28 @@ jobs:
9797
env:
9898
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9999

100-
- name: Publish to NPM
101-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && success() && matrix.os == 'ubuntu-16.04'
102-
run: npm publish --access public
100+
# Separate step for publishing to NPM so we're sure that generating + uploading prebuilds worked on all platforms
101+
npm-publish:
102+
needs: build
103+
name: Publish to NPM
104+
runs-on: ubuntu-20.04
105+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
106+
107+
steps:
108+
- uses: actions/checkout@v2
109+
- name: Use Node.js 15
110+
uses: actions/setup-node@v1
111+
with:
112+
node-version: 15.x
113+
registry-url: 'https://registry.npmjs.org'
114+
115+
- run: sudo apt-get install libsecret-1-dev
116+
name: Install additional dependencies
117+
118+
- run: npm install
119+
name: Setup environment
120+
121+
- run: npm publish --access public
122+
name: Upload to NPM
103123
env:
104124
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)