-
Notifications
You must be signed in to change notification settings - Fork 573
39 lines (31 loc) · 1.06 KB
/
deploy-npm-ironfish.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
name: Deploy @ironfish/sdk NPM Package
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Remove lifecycle scripts
run: cat <<< "$(jq 'del(.scripts.postinstall)' < package.json)" > package.json
- name: Insert Git hash into ironfish/package.json as gitHash
run: |
GIT_HASH=$(git rev-parse --short HEAD)
cat <<< "$(jq --arg gh "$GIT_HASH" '.gitHash = $gh' < ironfish/package.json)" > ironfish/package.json
- name: Install dependencies
run: yarn --non-interactive --frozen-lockfile
- name: Build
run: yarn build
working-directory: ./ironfish
- name: Publish
run: npm publish --access public
working-directory: ./ironfish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}