-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.68 KB
/
release.yml
File metadata and controls
69 lines (57 loc) · 1.68 KB
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
name: Release Workflow
on:
push:
tags:
- "v*"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GO_VERSION: 1.26
jobs:
build:
name: Build and Release Binaries
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && github.event.base_ref == 'refs/heads/main'
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Sanity check
run: make sanity-check
- name: Build binary
run: make release-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload binaries
uses: actions/upload-artifact@v5
with:
name: backup-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/backup-${{ matrix.goos }}-${{ matrix.goarch }}
release:
name: Publish Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: dist/*
generateReleaseNotes: true
immutableCreate: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
Release ${{ github.ref_name }} includes binaries for the following platforms:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64, arm64)