Skip to content

Commit edf4fb1

Browse files
committed
bumped dependencies
supported funalization voting
1 parent 331ac6c commit edf4fb1

File tree

22 files changed

+1199
-1249
lines changed

22 files changed

+1199
-1249
lines changed

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish snapshot package
2+
on:
3+
push:
4+
branches: [ 'master' ]
5+
release:
6+
types: [ published ]
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
jobs:
12+
publish-snapshots:
13+
environment:
14+
name: NPMJS
15+
url: ${{ steps.publish.outputs.url }}
16+
name: Publish snapshot packages
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
registry-url: 'https://registry.npmjs.org'
23+
node-version: '>=24.7.0' # Trusted publishing requires npm CLI version 11.5.1 or later.
24+
- run: npm i
25+
- if: ${{ github.event_name == 'push' }}
26+
run: |
27+
PACKAGE_NAME=$(jq --raw-output .name package.json)
28+
npm version prerelease --preid=snapshot --no-git-tag-version
29+
PREFIX=$(jq --raw-output .version package.json | sed 's/\.[0-9]\+$//')
30+
NEXT=$(npm view $PACKAGE_NAME versions --json \
31+
| jq --raw-output --arg prefix $PREFIX '[.[] | select(startswith($prefix))|capture("snapshot\\.(?<n>[0-9]+)").n|tonumber]|max + 1 // 0')
32+
npm version $PREFIX.$NEXT --no-git-tag-version
33+
echo "TAG=snapshot" >> $GITHUB_ENV
34+
- if: ${{ github.event_name == 'release' }}
35+
run: |
36+
npm version $(echo ${{ github.release.tag_name }} | sed 's/^v//') --no-git-tag-version
37+
echo "TAG=latest" >> $GITHUB_ENV
38+
- id: publish
39+
run: |
40+
npm run build
41+
npm publish --provenance --access public --tag $TAG
42+
echo "url=https://www.npmjs.com/package/@waves/ts-lib-crypto/v/$(jq --raw-output .version package.json)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)