File tree 1 file changed +13
-14
lines changed
1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
- name : Release squid
2
-
1
+ name : Release squid version
3
2
on :
4
3
push :
5
- tags :
6
- - ' v* '
4
+ branches :
5
+ - ' v[0-9]+ '
7
6
8
7
jobs :
9
8
build_and_publish :
@@ -25,22 +24,22 @@ jobs:
25
24
26
25
- name : update squid.yml
27
26
run : |
28
- # Get the tag from GitHub
29
- TAG=$(echo $ {{ github.ref }} | sed 's/refs\/tags\///')
30
-
31
- # Extract the numeric part of the tag
32
- VERSION=$(echo $TAG | sed 's/v//')
33
-
27
+ # Get the branch name from GitHub
28
+ BRANCH_NAME=$ {{ github.ref_name }}
29
+
30
+ # Extract the version from the branch name (assuming format 'vXX')
31
+ VERSION=$(echo $BRANCH_NAME | sed 's/^ v//')
32
+
34
33
# Update the version in squid.yaml
35
34
sed -i "s/^version: .*/version: $VERSION/" squid.yaml
36
-
35
+
37
36
# Optional: Print the updated version for verification
38
37
echo "Updated squid.yaml version to: $VERSION"
39
-
38
+
40
39
- name : Authenticate to squid
41
- env :
40
+ env :
42
41
API_TOKEN : ${{ secrets.SQUID_API_TOKEN }}
43
42
run : sqd auth -k $API_TOKEN
44
43
45
44
- name : Build and deploy squid
46
- run : sqd build && sqd deploy . -o origin --no-stream-logs
45
+ run : sqd build && sqd deploy . -o origin --no-stream-logs --allow-update
You can’t perform that action at this time.
0 commit comments