-
-
Notifications
You must be signed in to change notification settings - Fork 90
52 lines (47 loc) · 1.53 KB
/
release.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
45
46
47
48
49
50
51
52
# Cut a release whenever a new tag is pushed to the repo.
# You should use an annotated tag, like `git tag -a v1.2.3`
# and put the release notes into the commit message for the tag.
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
# Go cross-compilation works from linux -> any platform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Go Binaries
env:
# NB: this variable is read by tools/release/copy_release_artifacts.sh
DEST: artifacts
run: |
rm -rf ${{ env.DEST }}
mkdir -p ${{ env.DEST }}
bazel --bazelrc=.github/workflows/ci.bazelrc \
run --config=release //tools/release:copy_release_artifacts
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts/
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Fetch the built artifacts from build jobs above and extract into
# ${GITHUB_WORKSPACE}/artifacts/*
- uses: actions/download-artifact@v4
- name: Prepare workspace snippet
run: .github/workflows/release_prep.sh > release_notes.txt
- uses: softprops/action-gh-release@v2
with:
# Use GH feature to populate the changelog automatically
generate_release_notes: true
files: |
artifacts/*
bazel-lib-*.tar.gz
body_path: release_notes.txt
fail_on_unmatched_files: true