-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.08 KB
/
dev-npm-publish.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
name: dev-npm-publish
on:
push:
branches:
- "master"
jobs:
dev-npm-publish:
name: dev-npm-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
- name: Resolve version
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: "Version based on commit: 0.0.0-dev.${{ steps.vars.outputs.sha_short }}"
run: npm version 0.0.0-dev.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
- name: Build
run: yarn --frozen-lockfile && yarn run build && yarn run test
env:
MAINNET_ETHERSCAN_API_KEY: ${{ secrets.MAINNET_ETHERSCAN_API_KEY }}
POLYGON_ETHERSCAN_API_KEY: ${{ secrets.POLYGON_ETHERSCAN_API_KEY }}
- name: Publish Dev Release
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
tag: dev
access: public
- name: Publish to Stackblitz
run: npx pkg-pr-new publish --compact