File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release squid version
2+ on :
3+ push :
4+ branches :
5+ - ' v[0-9]+'
6+
7+ jobs :
8+ build_and_publish :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Install Node.js
15+ uses : actions/setup-node@v4
16+ with :
17+ node-version : 20
18+
19+ - name : Setup pnpm
20+ uses : pnpm/action-setup@v4
21+ with :
22+ version : 10
23+
24+ - name : Install squid CLI
25+ run : pnpm add -g @subsquid/cli
26+
27+ - name : Install dependencies
28+ run : pnpm install --frozen-lockfile
29+
30+ - name : update squid.yml
31+ run : |
32+ # Get the branch name from GitHub
33+ BRANCH_NAME=${{ github.ref_name }}
34+
35+ # Extract the version from the branch name (assuming format 'vXX')
36+ VERSION=$(echo $BRANCH_NAME | sed 's/^v//')
37+
38+ # Update the version in squid.yaml
39+ sed -i "s/^version: .*/version: $VERSION/" squid.yaml
40+
41+ # Optional: Print the updated version for verification
42+ echo "Updated squid.yaml version to: $VERSION"
43+
44+ - name : Authenticate to squid
45+ env :
46+ API_TOKEN : ${{ secrets.SQUID_API_TOKEN }}
47+ run : sqd auth -k $API_TOKEN
48+
49+ - name : Build and deploy squid
50+ run : sqd build && sqd deploy . -o origin --no-stream-logs --allow-update
You can’t perform that action at this time.
0 commit comments