Skip to content

Commit f51f768

Browse files
authored
Setup trusted publishing (#214)
2 parents 5252c7f + 76ad4c7 commit f51f768

31 files changed

Lines changed: 2992 additions & 3240 deletions

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525
- name: Set Node version
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: 20
29-
- uses: pnpm/action-setup@v4
30-
with:
31-
version: 9.10.0
28+
node-version: 24
29+
- uses: pnpm/action-setup@v6
3230
- name: Install Protoc
3331
uses: arduino/setup-protoc@v1
3432
with:

.github/workflows/release.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
# Releases are triggered manually to avoid making a billion releases by
5+
# accident.
6+
workflow_dispatch:
7+
8+
permissions: {}
79

810
jobs:
911
release:
10-
environment: Release
1112
runs-on: ubuntu-latest
13+
14+
# The PAT token used for publishing is in this environment
15+
environment: Release
16+
17+
permissions:
18+
# Used by trusted publishing
19+
id-token: write
20+
1221
steps:
1322
- name: Checkout
14-
uses: actions/checkout@v3
23+
uses: actions/checkout@v6
1524
with:
1625
persist-credentials: false
1726
- name: Set Node version
1827
uses: actions/setup-node@v4
1928
with:
20-
node-version: 20
21-
- uses: pnpm/action-setup@v4
22-
with:
23-
version: 9.10.0
29+
node-version: 24
30+
- uses: pnpm/action-setup@v6
2431
- name: Install Protoc
2532
uses: arduino/setup-protoc@v1
2633
with:
2734
repo-token: ${{ secrets.GITHUB_TOKEN }}
35+
2836
- name: Install dependencies
2937
run: pnpm install --strict-peer-dependencies=false --no-frozen-lockfile
3038
- name: Run build
3139
run: pnpm build
3240
- name: Set git credentials
3341
run: |
34-
git config user.name "Capy Bot"
42+
git config user.name "Kapy Bot"
3543
git config user.email "capy-bot@apibara.com"
36-
git remote set-url origin "https://${GIT_TOKEN}@github.com/apibara/typescript-sdk"
44+
git remote set-url origin "https://${GIT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
3745
env:
3846
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
3947
- name: Publish package
40-
run: pnpm beachball publish --access public --token "${NPM_TOKEN}" --tag next
41-
env:
42-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
run: pnpm beachball publish --access public -y
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/beaconchain",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/evm",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/evm-rpc",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/indexer",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/plugin-drizzle",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/plugin-health",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/plugin-mongo",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "build: update package version",
4+
"packageName": "@apibara/plugin-sqlite",
5+
"email": "francesco@ceccon.me",
6+
"dependentChangeType": "patch"
7+
}

0 commit comments

Comments
 (0)