Skip to content

Bumped dependencies #10

Bumped dependencies

Bumped dependencies #10

Workflow file for this run

name: Publish snapshot package
on:
pull_request:
push:
branches: [ 'master' ]
release:
types: [ published ]
permissions:
contents: read
id-token: write
jobs:
publish-snapshots:
environment:
name: prod
url: ${{ steps.publish.outputs.url }}
name: Publish snapshot packages
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{ github.event.number }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
- run: npm i
- if: ${{ github.event_name == 'pull_request' }}
run: |
npm version prerelease --preid=$PR_NUMBER-snapshot.$RUN_NUMBER.$RUN_ATTEMPT --no-git-tag-version
echo "TAG=snapshot" >> $GITHUB_ENV
- if: ${{ github.event_name == 'release' }}
run: |
VERSION=$(echo ${{ github.release.tag_name }} | sed 's/^v//')
npm version $VERSION --no-git-tag-version
echo "TAG=latest" >> $GITHUB_ENV
- if: ${{ github.event_name == 'push' }}
run: |
npm version prerelease --preid=snapshot.$RUN_NUMBER.$RUN_ATTEMPT --no-git-tag-version
echo "TAG=snapshot" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- run: npm test
- id: publish
run: |
npm version $VERSION --no-git-tag-version
npm run build
cd dist
npm publish --provenance --access public --tag $TAG
echo "url=https://www.npmjs.com/package/@waves/ts-lib-crypto/v/$VERSION" >> "$GITHUB_OUTPUT"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}