-
Notifications
You must be signed in to change notification settings - Fork 34
118 lines (100 loc) · 2.5 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Release
on:
push:
tags:
- 0.*
- 1.*
jobs:
binary:
strategy:
fail-fast: false
matrix:
msystem:
- 'MINGW32'
- 'UCRT64'
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
git
pacboy: >-
toolchain:p
glib2:p
cmake:p
- name: Pre-build
run: |
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: |
cmake --build build -v
- name: Create binary archive
run: |
cmake --build build -v --target package
- uses: actions/upload-artifact@v3
with:
name: binary
path: 'build/rifiuti2-*.zip'
if-no-files-found: error
source:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
sudo apt-get install -y
build-essential
cmake
ninja-build
libglib2.0-dev
libxml2-utils
- name: Pre-build
run: |
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Create source archive
run: |
cmake --build build -v --target package_source
- uses: actions/upload-artifact@v3
with:
name: source
path: 'build/rifiuti2-*.xz'
if-no-files-found: error
release:
needs:
- binary
- source
runs-on: ubuntu-22.04
permissions:
contents: write
environment: release
steps:
- name: Get source artifacts
uses: actions/download-artifact@v3
with:
name: source
- name: Get binary artifacts
uses: actions/download-artifact@v3
with:
name: binary
# BUG: No arg with space can be passed into 'args' below,
# quotes would mess up the command line passed into docker
- uses: thomasdesr/minisign-action@v1
with:
args: -S -m *.xz *.zip
minisign_key: ${{ secrets.MINISIGN_SECKEY }}
password: ${{ secrets.MINISIGN_PASS }}
- name: Create release notes fragment
run: |
echo ${{ vars.RELEASE_NOTES }} | base64 -d - > notes.md
- uses: ncipollo/release-action@v1
with:
artifacts: 'rifiuti2-*'
artifactErrorsFailBuild: true
draft: true
bodyFile: 'notes.md'