-
Notifications
You must be signed in to change notification settings - Fork 12
77 lines (71 loc) · 2.14 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
67
68
69
70
71
72
73
74
75
76
77
name: "CronitorCLI Release"
on:
push:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
name: Create Draft Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
# Currently we can't upload to a draft release so we are forced into this nonsense
release_name: Draft Release ${{ github.ref }}
draft: false
prerelease: false
build-binaries:
name: Create build assets
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
goos: [linux, windows, darwin, freebsd]
goarch: [amd64, arm, arm64]
exclude:
- goarch: arm
goos: darwin
- goarch: 386
goos: darwin
- goarch: arm
goos: windows
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v2
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
asset_name: ${{ matrix.goos }}_${{ matrix.goarch }}
goversion: 1.17
binary_name: cronitor
sha256sum: true
overwrite: true
pre_command: export CGO_ENABLED=0
publish:
name: Mark build complete
runs-on: ubuntu-latest
needs: [build-binaries]
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Update release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
release_name: Release ${{ steps.get_version.outputs.VERSION }}