Skip to content

Commit 980b106

Browse files
committed
update release flow
1 parent 6151e30 commit 980b106

4 files changed

Lines changed: 39 additions & 8 deletions

File tree

.github/workflows/release.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,28 @@ jobs:
1313
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16+
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
1623
- name: Log into Github registry
17-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
18-
- name: Docker build and push
19-
run: |
20-
docker build --build-arg VERSION=${GITHUB_REF##*/} -t ghcr.io/0xsequence/sidekick:${GITHUB_REF##*/} -t ghcr.io/0xsequence/sidekick:latest .
21-
docker push ghcr.io/0xsequence/sidekick:${GITHUB_REF##*/}
22-
docker push ghcr.io/0xsequence/sidekick:latest
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Build and push Docker image
31+
uses: docker/build-push-action@v5
32+
with:
33+
context: .
34+
push: true
35+
tags: |
36+
ghcr.io/0xsequence/sidekick:${{ github.ref_name }}
37+
ghcr.io/0xsequence/sidekick:latest
38+
platforms: linux/amd64,linux/arm64
39+
build-args: |
40+
VERSION=${{ github.ref_name }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"stop:redis": "redis-server stop",
2020
"start:redis": "redis-server --daemonize yes",
2121
"lint": "biome check .",
22-
"lint:fix": "biome check . --write"
22+
"lint:fix": "biome check . --write",
23+
"tag:release": "sh ./scripts/tag-release.sh"
2324
},
2425
"devDependencies": {
2526
"@biomejs/biome": "1.9.4",

scripts/tag-release.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
# Usage: npm run tag:release -- v1.0.7-dev
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: npm run tag:release -- vX.Y.Z[-dev]"
7+
exit 1
8+
fi
9+
10+
git tag -a "$1" -m "Release $1"
11+
git push origin "$1"

src/clients/indexerClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { SequenceIndexer } from '@0xsequence/indexer'
2+
import { PROJECT_ACCESS_KEY_DEV } from '~/constants/general'
23

34
export const indexerClient = (indexerUrl: string): SequenceIndexer | null => {
45
if (
@@ -12,7 +13,7 @@ export const indexerClient = (indexerUrl: string): SequenceIndexer | null => {
1213

1314
return new SequenceIndexer(
1415
indexerUrl,
15-
process.env.SEQUENCE_PROJECT_ACCESS_KEY as string,
16+
process.env.SEQUENCE_PROJECT_ACCESS_KEY as string || PROJECT_ACCESS_KEY_DEV,
1617
process.env.BUILDER_API_SECRET_KEY as string
1718
)
1819
}

0 commit comments

Comments
 (0)