Skip to content

Commit 9f4b737

Browse files
committed
feat(release): add GitHub Actions workflow for automated releases
1 parent f45fc00 commit 9f4b737

File tree

5 files changed

+93
-9
lines changed

5 files changed

+93
-9
lines changed

.changeset/cute-bottles-ask.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
'@lit-protocol/schemas': major
1313
'@lit-protocol/types': major
1414
'@lit-protocol/wasm': major
15-
'@lit-protocol/wrapped-keys': major
16-
'@lit-protocol/wrapped-keys-lit-actions': major
1715
---
1816

1917
first naga beta release

.changeset/cute-experts-clap.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
'@lit-protocol/schemas': patch
1313
'@lit-protocol/types': patch
1414
'@lit-protocol/wasm': patch
15-
'@lit-protocol/wrapped-keys': patch
16-
'@lit-protocol/wrapped-keys-lit-actions': patch
1715
---
1816

1917
Initial version after networks unification

.changeset/cyan-bears-invent.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
'@lit-protocol/schemas': patch
1313
'@lit-protocol/types': patch
1414
'@lit-protocol/wasm': patch
15-
'@lit-protocol/wrapped-keys': patch
16-
'@lit-protocol/wrapped-keys-lit-actions': patch
1715
---
1816

1917
Initial release for networks unification

.changeset/pre.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
"@lit-protocol/networks": "7.0.0",
1515
"@lit-protocol/schemas": "7.0.0",
1616
"@lit-protocol/types": "7.0.0",
17-
"@lit-protocol/wasm": "7.0.0",
18-
"@lit-protocol/wrapped-keys": "7.0.0",
19-
"@lit-protocol/wrapped-keys-lit-actions": "7.0.0"
17+
"@lit-protocol/wasm": "7.0.0"
2018
},
2119
"changesets": ["cute-bottles-ask", "cute-experts-clap", "cyan-bears-invent"]
2220
}

.github/workflows/release.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- naga
6+
- canary-naga
7+
8+
permissions:
9+
# allow pushing commits, creating tags, and modifying repo files
10+
# needed for the workflow to update package.json versions and CHANGELOG files
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check NPM Token
19+
run: |
20+
if [ -z "${{ secrets.NODE_AUTH_TOKEN }}" ]; then
21+
echo "❌ NODE_AUTH_TOKEN secret is not set. Please add it to repository secrets."
22+
exit 1
23+
else
24+
echo "✅ NODE_AUTH_TOKEN secret is available."
25+
fi
26+
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
# Enable this after PNPM migration
33+
# - name: Setup PNPM
34+
# uses: pnpm/action-setup@v4
35+
# with:
36+
# version: 9.15.0
37+
38+
# TODO: Disable this after PNPM migration
39+
- name: Setup Bun
40+
uses: oven-sh/setup-bun@v1
41+
with:
42+
bun-version: latest
43+
44+
- name: Install rust
45+
uses: dtolnay/[email protected]
46+
47+
- name: Install wasm-pack
48+
uses: jetli/[email protected]
49+
with:
50+
version: 'latest'
51+
52+
- name: Setup Node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '22.18.0'
56+
registry-url: 'https://registry.npmjs.org'
57+
58+
- name: Install project dependencies
59+
run: bun install --frozen-lockfile
60+
# Enable this after PNPM migration
61+
# run: pnpm install --frozen-lockfile
62+
63+
- name: Check current pre-release mode
64+
run: |
65+
if [ -f ".changeset/pre.json" ]; then
66+
echo "📋 Current pre-release mode status:"
67+
cat .changeset/pre.json | jq '{ mode: .mode, tag: .tag }'
68+
else
69+
echo "📋 Not in pre-release mode"
70+
fi
71+
72+
- name: Build
73+
env:
74+
NX_DAEMON: 'false'
75+
run: bun run build
76+
# Enable this after pnpm migration
77+
# run: pnpm build
78+
79+
- name: Create Release Pull Request or Publish to npm
80+
id: changesets
81+
uses: changesets/action@v1
82+
with:
83+
version: bunx changeset version
84+
publish: bunx changeset publish --access public
85+
# Enable this after pnpm migration
86+
# version: pnpm changeset version
87+
# publish: pnpm changeset publish --access public
88+
commit: 'chore(release): version packages'
89+
title: 'chore(release): version packages'
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

0 commit comments

Comments
 (0)