File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
tags :
6
6
- ' v[0-9]+.[0-9]+.[0-9]+'
7
+ pull_request :
8
+ branches : ['main', 'release/**']
9
+ paths :
10
+ - ' .github/workflows/releases.yml'
11
+ - ' scripts/**'
12
+ - ' Makefile'
13
+
7
14
env :
8
15
GO_VERSION : ' 1.21.9'
9
16
@@ -21,12 +28,19 @@ jobs:
21
28
STATIC_BINARY_NAME : ' '
22
29
steps :
23
30
- uses : actions/checkout@v4
24
- - name : Setup and export variables
31
+ - name : Export cleaned release tag
25
32
run : |
26
33
export release_tag=${GITHUB_REF#refs/*/} # Strip down to raw tag name
27
- export release_version=${release_tag/v/} # Remove v from tag name
28
-
29
34
echo "RELEASE_TAG=${release_tag}" >> $GITHUB_ENV
35
+ - name : Create dummy environment for release
36
+ if : github.event_name == 'pull_request'
37
+ run : |
38
+ touch THIRD_PARTY_LICENSES
39
+ echo "RELEASE_TAG=v0.0.0" >> $GITHUB_ENV
40
+ - name : Setup variables and release directories
41
+ run : |
42
+ export release_tag=${{ env.RELEASE_TAG }}
43
+ export release_version=${release_tag/v/} # Remove v from tag name
30
44
echo "DYNAMIC_BINARY_NAME=soci-snapshotter-${release_version}-linux-amd64.tar.gz" >> $GITHUB_ENV
31
45
echo "STATIC_BINARY_NAME=soci-snapshotter-${release_version}-linux-amd64-static.tar.gz" >> $GITHUB_ENV
32
46
56
70
- run : bash scripts/verify-release-artifacts.sh ${{ needs.generate-artifacts.outputs.release_tag }}
57
71
58
72
create-release :
73
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
59
74
needs : [generate-artifacts, validate-artifacts]
60
75
runs-on : ubuntu-20.04
61
76
steps :
You can’t perform that action at this time.
0 commit comments