-
Notifications
You must be signed in to change notification settings - Fork 60
47 lines (41 loc) · 1.6 KB
/
publish-casper-client-sdk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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