7
7
# Build/Release on demand
8
8
workflow_dispatch :
9
9
inputs :
10
- update_nightly :
11
- description : " Update nightly ?"
10
+ update_weekly :
11
+ description : " Update weekly ?"
12
12
required : false
13
13
default : false
14
14
type : boolean
15
15
schedule :
16
- - cron : " 0 0 * * * " # Nightly
16
+ - cron : " 45 8 * * 4 " # Weekly pre-release on Thursdays.
17
17
push :
18
18
tags :
19
19
- " *" # Tags that trigger a new release version
@@ -23,31 +23,31 @@ permissions:
23
23
pull-requests : read
24
24
id-token : write # Needed for aws-actions/configure-aws-credentials@v1
25
25
26
- env :
27
- NIGHTLY_TAG : 0.0.0-nightly
28
-
29
26
jobs :
30
27
tests :
31
28
uses : ./.github/workflows/cli-tests.yaml
32
29
with :
33
30
run-mac-tests : true
34
31
35
- nightly :
32
+ weekly :
36
33
runs-on : ubuntu-latest
37
34
environment : release
38
35
# needs: tests
39
- if : ${{ inputs.update_nightly || github.event.schedule }}
36
+ if : ${{ inputs.update_weekly || github.event.schedule }}
40
37
steps :
41
38
- name : Checkout source code
42
39
uses : actions/checkout@v3
43
40
with :
44
41
fetch-depth : 0 # Needed by goreleaser to browse history.
45
- - name : Set nightly tag
42
+ - name : Determine weekly tag
43
+ # This tag is semver and works with semver.Compare
44
+ run : echo "WEEKLY_TAG=$(date +%Y.%U)" >> $GITHUB_ENV
45
+ - name : Set weekly tag
46
46
id : tag_version
47
47
uses :
mathieudutour/[email protected]
48
48
with :
49
49
github_token : ${{ secrets.GITHUB_TOKEN }}
50
- custom_tag : ${{ env.NIGHTLY_TAG }}
50
+ custom_tag : ${{ env.WEEKLY_TAG }}
51
51
tag_prefix : " "
52
52
- name : Set up go
53
53
uses : actions/setup-go@v4
@@ -72,15 +72,13 @@ jobs:
72
72
SENTRY_PROJECT : ${{ vars.SENTRY_PROJECT }}
73
73
with :
74
74
environment : development
75
- # TODO: Add hash or date.
76
- version : ${{ env.NIGHTLY_TAG }}
75
+ version : ${{ env.WEEKLY_TAG }}
77
76
- name : Publish snapshot release to GitHub
78
77
uses : softprops/action-gh-release@v1
79
78
with :
80
79
prerelease : true
81
80
fail_on_unmatched_files : true
82
- tag_name : ${{ env.NIGHTLY_TAG }}
83
- name : nightly
81
+ tag_name : ${{ env.WEEKLY_TAG }}
84
82
files : |
85
83
dist/checksums.txt
86
84
dist/*.tar.gz
0 commit comments