-
Notifications
You must be signed in to change notification settings - Fork 153
66 lines (63 loc) · 2.16 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: create release binaries
on:
release:
types:
- published
workflow_dispatch:
jobs:
linux:
name: create linux binaries
runs-on: ubuntu-22.04
steps:
- name: checkout code
uses: actions/checkout@v4
- name: get release version
id: release_version
run: echo VERSION=${GITHUB_REF/refs\/tags\/v/} >> $GITHUB_ENV
- name: build amd64
run: |
set -eu
bazelisk build //:bazel-remote-linux-amd64
bazelisk run --run_under "cp -f " //:bazel-remote-linux-amd64 $(pwd)/bazel-remote-${{ env.VERSION }}-linux-x86_64
- name: build arm64
run: |
set -eu
bazelisk build //:bazel-remote-linux-arm64
bazelisk run --run_under "cp -f " //:bazel-remote-linux-arm64 $(pwd)/bazel-remote-${{ env.VERSION }}-linux-arm64
- name: upload linux binaries
id: upload-release-assets-linux
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: bazel-remote-${{ env.VERSION }}-linux-*
overwrite: true
tags: true
mac:
name: create mac binaries
runs-on: macos-11
steps:
- name: checkout
uses: actions/checkout@v4
- name: get release version
id: release_version
run: echo VERSION=${GITHUB_REF/refs\/tags\/v/} >> $GITHUB_ENV
- name: build amd64
run: |
set -eu
bazelisk build //:bazel-remote-darwin-amd64
bazelisk run --run_under "cp -f " //:bazel-remote-darwin-amd64 $(pwd)/bazel-remote-${{ env.VERSION }}-darwin-amd64
- name: build arm64
run: |
set -eu
bazelisk build //:bazel-remote-darwin-arm64
bazelisk run --run_under "cp -f " //:bazel-remote-darwin-arm64 $(pwd)/bazel-remote-${{ env.VERSION }}-darwin-arm64
- name: upload darwin binaries
id: upload-release-assets-darwin
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: bazel-remote-${{ env.VERSION }}-darwin-*
overwrite: true
tags: true