-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (44 loc) · 1.42 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
name: polycli-releaser
on:
push:
# run only against tags
tags:
- "*"
permissions:
contents: write
# packages: write
# issues: write
env:
GO_VERSION: "1.21"
jobs:
manual-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Install packages
run: sudo apt-get update && sudo apt-get install --yes gcc-aarch64-linux-gnu
- name: Perform cross build and compress binaries
shell: bash
run: |
make cross
pushd out
echo -n "${{github.ref_name}}" | sed 's/^v//' | tee ref_name.txt
readonly tag_name="$(cat ref_name.txt)"
echo "$tag_name"
mkdir polycli_${tag_name}_linux_arm64/
mv linux-arm64-polycli polycli_${tag_name}_linux_arm64/polycli
tar czf polycli_${tag_name}_linux_arm64.tar.gz polycli_${tag_name}_linux_arm64/
mkdir polycli_${tag_name}_linux_amd64/
mv linux-amd64-polycli polycli_${tag_name}_linux_amd64/polycli
tar czf polycli_${tag_name}_linux_amd64.tar.gz polycli_${tag_name}_linux_amd64/
- name: Publish binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: out/*.tar.gz
tag: ${{ github.ref }}
overwrite: true
file_glob: true