Skip to content

Casper JS SDK v5.0.0-beta1 #122

Casper JS SDK v5.0.0-beta1

Casper JS SDK v5.0.0-beta1 #122

# 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: echo "release_tag=condor" >> $GITHUB_ENV
- 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 run build
- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ env.release_tag }}
access: "public"
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- run: cp dist/lib.node.js casper-js-sdk.v${{ steps.get_version.outputs.version }}.js
- uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: casper-js-sdk.v${{ steps.get_version.outputs.version }}.js
allow_override: true