-
Notifications
You must be signed in to change notification settings - Fork 27
37 lines (36 loc) · 1.16 KB
/
publish-npm-dev.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
name: Publish Dev to NPM
on:
push:
branches:
- 'releases/**'
paths:
- "packages/**"
permissions:
contents: write
# defaults:
# run:
# working-directory: ./packages/starknet-snap
jobs:
publish-dev-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
yarn install --no-immutable
yarn workspace @consensys/starknet-snap setup
VERSION=$(node -p "require('./packages/starknet-snap/package.json').version")
HASH=$(git rev-parse --short HEAD)
DATE=$(date +%Y%m%d)
npm --prefix ./packages/starknet-snap version --new-version ${VERSION}-dev-${HASH}-${DATE} --no-git-tag-version
yarn workspace @consensys/starknet-snap build
env:
SNAP_ENV: dev
VOYAGER_API_KEY: ${{ secrets.VOYAGER_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm publish ./packages/starknet-snap --tag dev --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}