forked from pipe-cd/pipecd
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (50 loc) · 2.31 KB
/
publish_binary.yaml
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
name: publish
on:
push:
tags:
- 'v*'
env:
GO_VERSION: 1.22.4
jobs:
gh_release:
runs-on: ubuntu-latest
steps:
- run: echo "not implemented"
binary:
runs-on: ubuntu-latest
needs: gh_release
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
- name: Build binary artifacts
run: |
make build/go MOD=piped BUILD_OS=linux BUILD_ARCH=amd64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_linux_amd64
make build/go MOD=piped BUILD_OS=linux BUILD_ARCH=arm64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_linux_arm64
make build/go MOD=piped BUILD_OS=darwin BUILD_ARCH=amd64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_darwin_amd64
make build/go MOD=piped BUILD_OS=darwin BUILD_ARCH=arm64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_darwin_arm64
make build/go MOD=pipectl BUILD_OS=linux BUILD_ARCH=amd64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_linux_amd64
make build/go MOD=pipectl BUILD_OS=linux BUILD_ARCH=arm64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_linux_arm64
make build/go MOD=pipectl BUILD_OS=darwin BUILD_ARCH=amd64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_darwin_amd64
make build/go MOD=pipectl BUILD_OS=darwin BUILD_ARCH=arm64 BIN_SUFFIX=_${{ env.PIPECD_VERSION }}_darwin_arm64
- name: Publish binary artifacts
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 #v0.1.14
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./.artifacts/piped_${{ env.PIPECD_VERSION }}_linux_amd64
./.artifacts/piped_${{ env.PIPECD_VERSION }}_linux_arm64
./.artifacts/piped_${{ env.PIPECD_VERSION }}_darwin_amd64
./.artifacts/piped_${{ env.PIPECD_VERSION }}_darwin_arm64
./.artifacts/pipectl_${{ env.PIPECD_VERSION }}_linux_amd64
./.artifacts/pipectl_${{ env.PIPECD_VERSION }}_linux_arm64
./.artifacts/pipectl_${{ env.PIPECD_VERSION }}_darwin_amd64
./.artifacts/pipectl_${{ env.PIPECD_VERSION }}_darwin_arm64