-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.27 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
78
name: Release
on:
workflow_dispatch:
inputs:
runtipi_version:
description: Runtipi version to use (v3.6.0, nightly...)
required: true
cli_version:
description: CLI Version to use (v0.1.0, v0.1.1...)
required: true
prerelease:
description: Is this version a prerelease?
type: boolean
default: false
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ github.event.inputs.cli_version }}-runtipi-${{ github.event.inputs.runtipi_version }}
build-cli:
needs: create-tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.5"
- name: Set CLI Version
run: echo ${{ github.event.inputs.cli_version }} > internal/constants/assets/CLI_VERSION
- name: Set Runtipi Version
run: echo ${{ github.event.inputs.runtipi_version }} > internal/constants/assets/RUNTIPI_VERSION
- name: Build CLI for amd64
run: GOOS=linux GOARCH=arm64 go build . && mv runtipi-cli-go runtipi-cli-go-arm64
- name: Build CLI for arm64
run: GOOS=linux GOARCH=amd64 go build . && mv runtipi-cli-go runtipi-cli-go-amd64
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: |
runtipi-cli-go-arm64
runtipi-cli-go-amd64
release:
needs: [create-tag, build-cli]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: binaries
path: binaries
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ github.event.inputs.cli_version }}-runtipi-${{ github.event.inputs.runtipi_version }}
name: ${{ github.event.inputs.cli_version }}-runtipi-${{ github.event.inputs.runtipi_version }}
files: binaries/*