Skip to content

Commit 3464e8b

Browse files
committed
Set up weekly
1 parent 2717361 commit 3464e8b

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.github/workflows/cli-release.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
# Build/Release on demand
88
workflow_dispatch:
99
inputs:
10-
update_nightly:
11-
description: "Update nightly?"
10+
update_weekly:
11+
description: "Update weekly?"
1212
required: false
1313
default: false
1414
type: boolean
1515
schedule:
16-
- cron: "0 0 * * *" # Nightly
16+
- cron: "45 8 * * 4" # Weekly pre-release on Thursdays.
1717
push:
1818
tags:
1919
- "*" # Tags that trigger a new release version
@@ -23,31 +23,31 @@ permissions:
2323
pull-requests: read
2424
id-token: write # Needed for aws-actions/configure-aws-credentials@v1
2525

26-
env:
27-
NIGHTLY_TAG: 0.0.0-nightly
28-
2926
jobs:
3027
tests:
3128
uses: ./.github/workflows/cli-tests.yaml
3229
with:
3330
run-mac-tests: true
3431

35-
nightly:
32+
weekly:
3633
runs-on: ubuntu-latest
3734
environment: release
3835
# needs: tests
39-
if: ${{ inputs.update_nightly || github.event.schedule }}
36+
if: ${{ inputs.update_weekly || github.event.schedule }}
4037
steps:
4138
- name: Checkout source code
4239
uses: actions/checkout@v3
4340
with:
4441
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
4646
id: tag_version
4747
uses: mathieudutour/[email protected]
4848
with:
4949
github_token: ${{ secrets.GITHUB_TOKEN }}
50-
custom_tag: ${{ env.NIGHTLY_TAG }}
50+
custom_tag: ${{ env.WEEKLY_TAG }}
5151
tag_prefix: ""
5252
- name: Set up go
5353
uses: actions/setup-go@v4
@@ -72,15 +72,13 @@ jobs:
7272
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
7373
with:
7474
environment: development
75-
# TODO: Add hash or date.
76-
version: ${{ env.NIGHTLY_TAG }}
75+
version: ${{ env.WEEKLY_TAG }}
7776
- name: Publish snapshot release to GitHub
7877
uses: softprops/action-gh-release@v1
7978
with:
8079
prerelease: true
8180
fail_on_unmatched_files: true
82-
tag_name: ${{ env.NIGHTLY_TAG }}
83-
name: nightly
81+
tag_name: ${{ env.WEEKLY_TAG }}
8482
files: |
8583
dist/checksums.txt
8684
dist/*.tar.gz

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ archives:
2626
- no-files-will-match-* # Glob that does not match to create archive with only binaries.
2727
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
2828
snapshot:
29-
name_template: "{{ .Env.NIGHTLY_TAG }}"
29+
name_template: "{{ .Env.WEEKLY_TAG }}"
3030
checksum:
3131
name_template: "checksums.txt"
3232
algorithm: sha256

0 commit comments

Comments
 (0)