Skip to content

Commit 584f427

Browse files
committed
Update node, publishing workflow
1 parent d15d09e commit 584f427

File tree

4 files changed

+37
-63
lines changed

4 files changed

+37
-63
lines changed

.github/workflows/build-packages.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ jobs:
99
name: Build Packages
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
with:
1414
persist-credentials: false
15-
15+
- name: Enable Corepack
16+
run: corepack enable
1617
- name: Setup NodeJS
17-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v6
1819
with:
19-
node-version: 18
20+
node-version: 24
2021
cache: 'yarn'
2122

22-
- name: Setup Yarn
23-
run: |
24-
npm install -g yarn
25-
echo "Yarn version: $(yarn -v)"
26-
2723
# Build is triggered in prepare script
2824
- name: Install Dependencies
2925
run: yarn install --frozen-lockfile

.github/workflows/dev-packages.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,51 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
# Dev publishing
79

810
concurrency: ${{ github.workflow }}-${{ github.ref }}
911

12+
permissions:
13+
id-token: write # Required for OIDC
14+
contents: write # Required for changesets pushing
15+
pull-requests: write # Required for changesets to create PRs
16+
1017
jobs:
1118
release:
1219
name: Release
1320
runs-on: ubuntu-latest
1421
steps:
1522
- name: Checkout Repo
16-
uses: actions/checkout@v4
17-
18-
- name: Setup Node.js 18
19-
uses: actions/setup-node@v4
23+
uses: actions/checkout@v5
24+
- name: Enable Corepack
25+
run: corepack enable
26+
- name: Setup Node.js 24
27+
uses: actions/setup-node@v6
2028
with:
21-
node-version: 18
29+
node-version: 24
30+
cache: yarn
2231

2332
# This also builds the package as part of the post install
2433
- name: Install Dependencies
25-
run: yarn
34+
run: yarn install --frozen-lockfile
2635

2736
- name: Create Release Pull Request or Publish to npm
2837
id: changesets
2938
uses: changesets/action@v1
39+
if: ${{ github.event_name == 'push' }}
3040
with:
3141
# This expects you to have a script called release which does a build for your packages and calls changeset publish
3242
publish: yarn release
3343
env:
3444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3545
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
47+
- name: Dev publish
48+
if: ${{ github.event_name == 'workflow_dispatch' }}
49+
run: |
50+
node ./scripts/dev-package-pre-version.js
51+
yarn changeset version --no-git-tag --snapshot dev
52+
yarn changeset publish --tag dev
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: actions/checkout@v5
1414
with:
1515
persist-credentials: false
16+
- name: Enable Corepack
17+
run: corepack enable
1618

1719
- name: Enable KVM group perms
1820
run: |
@@ -33,9 +35,9 @@ jobs:
3335
key: avd-31
3436

3537
- name: Setup NodeJS
36-
uses: actions/setup-node@v5
38+
uses: actions/setup-node@v6
3739
with:
38-
node-version: 18
40+
node-version: 24
3941
cache: 'yarn'
4042

4143
- name: Set up JDK 17
@@ -45,11 +47,6 @@ jobs:
4547
distribution: 'adopt'
4648
cache: 'gradle'
4749

48-
- name: Setup Yarn
49-
run: |
50-
npm install -g yarn
51-
echo "Yarn version: $(yarn -v)"
52-
5350
- name: Install Dependencies
5451
run: yarn install --frozen-lockfile
5552

@@ -93,6 +90,8 @@ jobs:
9390
- uses: actions/checkout@v5
9491
with:
9592
persist-credentials: false
93+
- name: Enable Corepack
94+
run: corepack enable
9695

9796
- uses: irgaly/xcode-cache@v1
9897
if: false # Currently broken, see e.g. https://github.com/powersync-ja/react-native-quick-sqlite/actions/runs/18458692696/job/52584961537
@@ -111,14 +110,9 @@ jobs:
111110
- name: Setup NodeJS
112111
uses: actions/setup-node@v5
113112
with:
114-
node-version: 18
113+
node-version: 24
115114
cache: 'yarn'
116115

117-
- name: Setup Yarn
118-
run: |
119-
npm install -g yarn
120-
echo "Yarn version: $(yarn -v)"
121-
122116
- name: Install Dependencies
123117
run: yarn install --frozen-lockfile
124118

0 commit comments

Comments
 (0)