-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (42 loc) · 1.13 KB
/
release.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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version (semver)'
required: true
type: string
env:
VERSION: ${{inputs.version}}
jobs:
# Push image to GitHub Packages.
release:
name: Release
runs-on: ubuntu-22.04
steps:
# https://github.com/actions/checkout
- name: Checkout Project (main)
uses: actions/checkout@v3
with:
ref: main
# https://github.com/actions/setup-go
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.0'
- name: Build binary
run: |
echo "Starting build"
./bin/build.sh "${VERSION}"
echo "Build complete"
- name: Build package
run: |
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
nfpm pkg --packager deb --target /dist/
- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${VERSION}" \
--notes "Created by Github Action on $(date -u +%Y-%m-%dT%H:%M:%SZ)" \
./dist/which-dns