Skip to content

Commit 7ea5943

Browse files
committed
add action and canary release
1 parent c4334bd commit 7ea5943

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Setup
2+
runs:
3+
using: composite
4+
steps:
5+
- uses: actions/setup-node@v4
6+
with:
7+
node-version-file: '.nvmrc'
8+
registry-url: https://registry.npmjs.org
9+
cache: yarn
10+
11+
# For provenance https://docs.npmjs.com/generating-provenance-statements#prerequisites
12+
- name: Install npm 9.5
13+
run: npm install -g npm@^9.5.0
14+
shell: bash
15+
16+
- name: Install node modules
17+
run: yarn install --frozen-lockfile
18+
shell: bash
File renamed without changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release (Canary)
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
canary:
7+
name: Release canary
8+
runs-on: ubuntu-latest
9+
environment: release
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
id-token: write
14+
timeout-minutes: 5
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
21+
- name: 'Setup'
22+
uses: ./.github/actions/setup
23+
24+
- name: Set version
25+
run: npm --no-git-tag-version version $(node -p "require('./packages/wallet-sdk/package.json').version")-canary.$(date +'%Y%m%d') -w packages/wallet-sdk
26+
27+
- name: Build
28+
shell: bash
29+
run: yarn build:packages
30+
31+
- name: Set deployment token
32+
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
33+
34+
- name: Publish to npm
35+
run: cd packages/wallet-sdk && npm publish --tag canary
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+

.github/workflows/release.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)