2020-09-15 12:31:33 +02:00
|
|
|
name: Releaser
|
2020-05-18 21:35:58 +02:00
|
|
|
|
|
|
|
on:
|
2021-09-02 13:16:11 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
2021-11-03 11:14:54 +01:00
|
|
|
description: "Release Tag"
|
2021-09-02 13:16:11 +02:00
|
|
|
required: true
|
|
|
|
|
2020-05-18 21:35:58 +02:00
|
|
|
jobs:
|
|
|
|
upload-release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-03 11:14:54 +01:00
|
|
|
- name: Set up Go 1.17
|
2021-02-17 17:51:14 +01:00
|
|
|
uses: actions/setup-go@v2
|
2020-05-18 21:35:58 +02:00
|
|
|
with:
|
2021-11-03 11:14:54 +01:00
|
|
|
go-version: 1.17
|
2020-05-18 21:35:58 +02:00
|
|
|
id: go
|
|
|
|
|
2021-01-07 19:44:10 +01:00
|
|
|
- name: Setup docker CLI
|
|
|
|
run: |
|
2021-02-18 13:53:00 +01:00
|
|
|
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
2021-01-07 19:44:10 +01:00
|
|
|
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
|
|
|
|
2020-05-18 21:35:58 +02:00
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-02-18 13:53:00 +01:00
|
|
|
- uses: actions/cache@v2
|
2020-05-18 21:35:58 +02:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
|
|
|
- name: Build
|
2021-09-02 14:48:56 +02:00
|
|
|
run: make GIT_TAG=${{ github.event.inputs.tag }} -f builder.Makefile cross
|
2020-05-18 21:35:58 +02:00
|
|
|
|
2021-09-28 14:55:37 +02:00
|
|
|
- name: Compute checksums
|
|
|
|
run: cd bin; for f in *; do shasum --algorithm 256 $f > $f.sha256; done
|
|
|
|
|
2021-06-09 15:47:13 +02:00
|
|
|
- name: License
|
|
|
|
run: cp packaging/* bin/
|
|
|
|
|
2020-05-18 21:35:58 +02:00
|
|
|
- uses: ncipollo/release-action@v1
|
|
|
|
with:
|
2021-05-27 12:10:37 +02:00
|
|
|
artifacts: "bin/*"
|
2020-05-18 21:35:58 +02:00
|
|
|
prerelease: true
|
2021-09-04 09:21:47 +02:00
|
|
|
commit: "v2"
|
2020-05-18 21:35:58 +02:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-09-02 13:16:11 +02:00
|
|
|
tag: ${{ github.event.inputs.tag }}
|