Skip to content

Commit 057c975

Browse files
committed
Prepare for trusted publishing
1 parent 63bdf9d commit 057c975

14 files changed

+97
-231
lines changed

.changeset/sour-boxes-raise.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@powersync/adapter-sql-js': patch
3+
'@powersync/attachments': patch
4+
'@powersync/common': patch
5+
'@powersync/drizzle-driver': patch
6+
'@powersync/kysely-driver': patch
7+
'@powersync/node': patch
8+
'@powersync/op-sqlite': patch
9+
'@powersync/react': patch
10+
'@powersync/react-native': patch
11+
'@powersync/tanstack-react-query': patch
12+
'@powersync/vue': patch
13+
'@powersync/web': patch
14+
'@powersync/diagnostics-app': patch
15+
---
16+
17+
Migrate to trusted publishing.

.github/workflows/audit.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repo
15-
uses: actions/checkout@v4
16-
- uses: pnpm/action-setup@v4
17-
name: Install pnpm
15+
uses: actions/checkout@v5
16+
- name: Enable Corepack
17+
run: corepack enable
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
1820
with:
19-
version: 9
20-
run_install: false
21+
cache: pnpm
2122
- name: Audit for vulnerabilities
2223
run: npx audit-ci@^7 --config ./audit-ci.jsonc

.github/workflows/build-docs.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,15 @@ jobs:
1212
GH_URL: http://example.test
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
16+
- name: Enable Corepack
17+
run: corepack enable
1618
- name: Setup NodeJS
17-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v6
1820
with:
1921
node-version-file: '.nvmrc'
20-
- uses: pnpm/action-setup@v2
21-
name: Install pnpm
22-
with:
23-
version: 9
24-
run_install: false
25-
- name: Get pnpm store directory
26-
shell: bash
27-
run: |
28-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29-
- uses: actions/cache@v3
30-
name: Setup pnpm cache
31-
with:
32-
path: ${{ env.STORE_PATH }}
33-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34-
restore-keys: |
35-
${{ runner.os }}-pnpm-store-
22+
cache: pnpm
23+
3624
- name: Install dependencies
3725
run: pnpm install
3826
- name: Build Packages

.github/workflows/build-packages.yaml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,15 @@ jobs:
1010
name: Build Packages
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
with:
15-
persist-credentials: false
16-
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
- name: Enable Corepack
16+
run: corepack enable
1717
- name: Setup NodeJS
18-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v6
1919
with:
2020
node-version-file: '.nvmrc'
21-
22-
- uses: pnpm/action-setup@v2
23-
name: Install pnpm
24-
with:
25-
version: 9
26-
run_install: false
27-
28-
- name: Get pnpm store directory
29-
shell: bash
30-
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
33-
- uses: actions/cache@v3
34-
name: Setup pnpm cache
35-
with:
36-
path: ${{ env.STORE_PATH }}
37-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38-
restore-keys: |
39-
${{ runner.os }}-pnpm-store-
21+
cache: pnpm
4022

4123
- name: Install dependencies
4224
run: pnpm install

.github/workflows/deploy-docs.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,15 @@ jobs:
2727
GH_PROJECT_NAME: ${{vars.GH_PROJECT_NAME}}
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
31+
- name: Enable Corepack
32+
run: corepack enable
3133
- name: Setup NodeJS
32-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@v6
3335
with:
3436
node-version-file: '.nvmrc'
35-
- uses: pnpm/action-setup@v2
36-
name: Install pnpm
37-
with:
38-
version: 9
39-
run_install: false
40-
- name: Get pnpm store directory
41-
shell: bash
42-
run: |
43-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
44-
- uses: actions/cache@v3
45-
name: Setup pnpm cache
46-
with:
47-
path: ${{ env.STORE_PATH }}
48-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49-
restore-keys: |
50-
${{ runner.os }}-pnpm-store-
37+
cache: pnpm
38+
5139
- name: Install dependencies
5240
run: pnpm install
5341
- name: Build Packages

.github/workflows/dev-packages.yaml

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

.github/workflows/diagnostics-image-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v3

.github/workflows/diagnostics-image-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.ref == 'refs/heads/main'
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Set up Docker Buildx
2323
uses: docker/setup-buildx-action@v3

.github/workflows/release.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch: # For dev publishing
78

89
concurrency: ${{ github.workflow }}-${{ github.ref }}
910

11+
permissions:
12+
id-token: write # Required for OIDC / trusted publishing
13+
contents: write # Required for changesets pushing commits
14+
pull-requests: write # Required for changesets creating PRs
15+
1016
jobs:
1117
release:
1218
name: Release
1319
runs-on: ubuntu-latest
1420
steps:
15-
- name: Checkout Repo
16-
uses: actions/checkout@v4
17-
- name: Setup Node.js
18-
uses: actions/setup-node@v4
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
- name: Enable Corepack
24+
run: corepack enable
25+
- name: Setup NodeJS
26+
uses: actions/setup-node@v6
1927
with:
2028
node-version-file: '.nvmrc'
21-
- uses: pnpm/action-setup@v2
22-
name: Install pnpm
23-
with:
24-
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
25-
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
26-
version: 9.3
27-
run_install: false
28-
- name: Get pnpm store directory
29-
shell: bash
29+
cache: pnpm
30+
- name: Update npm
3031
run: |
31-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32-
- uses: actions/cache@v3
33-
name: Setup pnpm cache
34-
with:
35-
path: ${{ env.STORE_PATH }}
36-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pnpm-store-
32+
npm install -g npm@latest
33+
npm --version
34+
3935
- name: Install dependencies
4036
run: pnpm install
37+
- name: Build
38+
run: pnpm build:packages:prod
39+
4140
- name: Create Release Pull Request or Publish to npm
4241
id: changesets
42+
if: ${{ github.event_name == 'push' }}
4343
uses: changesets/action@v1
4444
with:
4545
# Update the monorepo lockfile after versioning
@@ -48,4 +48,9 @@ jobs:
4848
publish: pnpm release
4949
env:
5050
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
52+
- name: Publish
53+
if: ${{ github.event_name == 'workflow_dispatch' }}
54+
run: |
55+
pnpm changeset version --no-git-tag --snapshot dev
56+
pnpm changeset publish --tag dev

.github/workflows/test-isolated.yaml

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 30
1212
steps:
13-
- uses: actions/checkout@v4
14-
with:
15-
persist-credentials: false
16-
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
- name: Enable Corepack
16+
run: corepack enable
1717
- name: Setup NodeJS
18-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v6
1919
with:
2020
node-version-file: '.nvmrc'
21-
22-
- uses: pnpm/action-setup@v2
23-
name: Install pnpm
24-
with:
25-
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
26-
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
27-
version: 9.3
28-
run_install: false
29-
30-
- name: Get pnpm store directory
31-
shell: bash
32-
run: |
33-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
34-
35-
- uses: actions/cache@v3
36-
name: Setup pnpm cache
37-
with:
38-
path: ${{ env.STORE_PATH }}
39-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40-
restore-keys: |
41-
${{ runner.os }}-pnpm-store-
21+
cache: pnpm
4222

4323
- name: Install
4424
run: pnpm install

0 commit comments

Comments
 (0)