Skip to content

v0.15.9

v0.15.9 #38

Workflow file for this run

name: Publish
on:
release:
types: [ published ]
jobs:
npm:
name: NPM
runs-on: ubuntu-latest
environment: NPM Release
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: '.nvmrc'
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
id: version
with:
script: |
const semver = context.ref.replace('refs/tags/v', '')
if (semver.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
return semver
}
throw new Error('not semver')
result-encoding: string
- run: npm ci
- run: npm run build
- run: npm run version:set ${{ steps.version.outputs.result }}
# Because lerna doesn't update peers deps, although using it "wrongly" this behavior ensures all deps are aligned.
- name: find and replace peerDependencies
run: |
find packages/*/package.json adapters/package.json -type f -exec sed -i 's# "@defichain/salmon-core": "0.0.0"# "@defichain/salmon-core": "^${{ steps.version.outputs.result }}"#g' {} \;
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm run publish:latest
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}