Skip to content

publish-casper-js-sdk #102

publish-casper-js-sdk

publish-casper-js-sdk #102

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: publish-casper-js-sdk
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-24.04
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [20.x]
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
- name: Set release tag
run: |
if [ ${{ github.event.release.target_commitish }} == 'condor' ]; then
echo "release_tag=condor" >> $GITHUB_ENV
else
echo "release_tag=latest" >> $GITHUB_ENV
fi
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a #v3.4.0
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install and Build 🔧
run: |
npm install
npm build
- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ env.release_tag }}
access: "public"