-
Notifications
You must be signed in to change notification settings - Fork 572
61 lines (48 loc) · 1.36 KB
/
deploy-npm-ironfish-rust-nodejs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deploy @ironfish/rust-nodejs NPM Packages
env:
DEBUG: 'napi:*'
MACOSX_DEPLOYMENT_TARGET: '10.13'
on:
workflow_dispatch:
jobs:
build-and-test:
uses: ./.github/workflows/build-ironfish-rust-nodejs.yml
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- build-and-test
defaults:
run:
working-directory: ./ironfish-rust-nodejs
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Install dependencies
run: npm install --no-workspaces
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ironfish-rust-nodejs/artifacts
- name: List packages
run: ls -R .
shell: bash
- name: Verify artifacts exist
run: |
if [ -z "$(ls -A './artifacts')" ]; then
echo "artifacts folder was empty. ironfish-rust-nodejs artifacts were not uploaded correctly."
exit 1
fi
- name: Move and publish artifacts
run: yarn artifacts
- name: List packages
run: ls -R ./npm
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}