-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (41 loc) · 1.23 KB
/
release-go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release Go modules
concurrency: commits-to-main
on:
# Daily at 6 PM EST / 3 PM PST / 11 PM UTC
# The daemon repos check for UI updates an
# hour later at 7 PM EST / 4 PM PST / 12 AM UTC
schedule:
- cron: 0 23 * * *
# Enable manual trigger
workflow_dispatch:
jobs:
release-go:
runs-on: ubuntu-latest
steps:
- name: Checkout all commits
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.COMMIT_PAT }}
- name: Setup
uses: ./.github/actions/setup
with:
node_version: 20.10.0
- name: Release
run: ./scripts/release-go.sh
- name: Commit
shell: bash
run: |
# check out the commit as a new branch
git checkout -b release
# sync up the main branch in case something has been merged
# since the action started
git fetch origin main
# checkout the main branch and merge in the release branch
# this will be a fast forward merge unless something went wrong
git checkout main
git merge release
# push the main branch
git push origin main --tags
# cleanup
git branch -D release