7
7
# Build/Release on demand
8
8
workflow_dispatch :
9
9
inputs :
10
- is_prerelease :
11
- description : " Pre-release ?"
10
+ update_nightly :
11
+ description : " Update nightly ?"
12
12
required : false
13
13
default : false
14
14
type : boolean
15
15
schedule :
16
- - cron : " 45 8 * * 4 " # Weekly pre-release on Thursdays.
16
+ - cron : " 0 0 * * * " # Nightly
17
17
push :
18
18
tags :
19
19
- " *" # Tags that trigger a new release version
@@ -23,23 +23,32 @@ 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
26
28
27
29
jobs :
28
30
tests :
29
31
uses : ./.github/workflows/cli-tests.yaml
30
32
with :
31
33
run-mac-tests : true
32
34
33
- prerelease :
35
+ nightly :
34
36
runs-on : ubuntu-latest
35
37
environment : release
36
38
# needs: tests
37
- if : ${{ inputs.is_prerelease || github.event.schedule }}
39
+ if : ${{ inputs.update_nightly || github.event.schedule }}
38
40
steps :
39
41
- name : Checkout source code
40
42
uses : actions/checkout@v3
41
43
with :
42
44
fetch-depth : 0 # Needed by goreleaser to browse history.
45
+ - name : Set nightly tag
46
+ id : tag_version
47
+ uses :
mathieudutour/[email protected]
48
+ with :
49
+ github_token : ${{ secrets.GITHUB_TOKEN }}
50
+ custom_tag : ${{ env.NIGHTLY_TAG }}
51
+ tag_prefix : " "
43
52
- name : Set up go
44
53
uses : actions/setup-go@v4
45
54
with :
55
64
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
65
TELEMETRY_KEY : ${{ secrets.TELEMETRY_KEY }}
57
66
SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
58
- - name : Determine snapshot tag
59
- run : |
60
- TAG=$(ls dist/*_linux_386.tar.gz | cut -d '_' -f 2 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+-dev')
61
- echo "release_tag=$TAG" >> $GITHUB_ENV
62
67
- name : Create Sentry release
63
68
uses : getsentry/action-release@v1
64
69
env :
@@ -67,16 +72,19 @@ jobs:
67
72
SENTRY_PROJECT : ${{ vars.SENTRY_PROJECT }}
68
73
with :
69
74
environment : development
70
- version : ${{ env.release_tag }}
75
+ # TODO: Add hash or date.
76
+ version : ${{ env.NIGHTLY_TAG }}
71
77
- name : Publish snapshot release to GitHub
72
78
uses : softprops/action-gh-release@v1
73
79
with :
74
80
prerelease : true
75
81
fail_on_unmatched_files : true
76
- tag_name : ${{ env.release_tag }}
82
+ tag_name : ${{ env.NIGHTLY_TAG }}
83
+ name : nightly
77
84
files : |
78
85
dist/checksums.txt
79
86
dist/*.tar.gz
87
+
80
88
release :
81
89
runs-on : ubuntu-latest
82
90
environment : release
0 commit comments