-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (34 loc) · 1.54 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
name: Release
on:
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code of the project
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Fetch project dependencies
run: go mod download -x
- name: Build binary for Linux on amd64 (x86_64)
run: GOOS=linux GOARCH=amd64 go build -v -o bin/docker-machine-driver-g5k-linux-x86_64
- name: Build binary for Linux on arm64 (arm64)
run: GOOS=linux GOARCH=arm64 go build -v -o bin/docker-machine-driver-g5k-linux-arm64
- name: Build binary for Windows on amd64 (x86_64)
run: GOOS=windows GOARCH=amd64 go build -v -o bin/docker-machine-driver-g5k-windows-x86_64
- name: Build binary for MacOS on amd64 (x86_64)
run: GOOS=darwin GOARCH=amd64 go build -v -o bin/docker-machine-driver-g5k-macos-x86_64
- name: Build binary for MacOS on Apple Silicon (arm64)
run: GOOS=darwin GOARCH=arm64 go build -v -o bin/docker-machine-driver-g5k-macos-arm64
- name: Generate md5 and sha256 checksum files
run: |
(cd bin && md5sum docker-machine-driver-g5k-* >MD5SUMS && cat MD5SUMS)
(cd bin && sha256sum docker-machine-driver-g5k-* >SHA256SUMS && cat SHA256SUMS)
- name: Upload binaries and checksum files to GitHub release
run: gh release upload ${{ github.event.release.tag_name }} bin/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}