-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (62 loc) · 1.77 KB
/
main.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
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
name: Build and release
on:
push:
branches:
- master
tags:
- v*
jobs:
build-linux:
runs-on: ubuntu-24.04
container: rust:1.81.0
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
- name: Bootstrap
run: apt-get update -y && apt-get install -y libdbus-1-dev libasound2-dev
- name: Set Last.fm key
shell: bash
env:
LASTFM_KEY: ${{ secrets.LASTFM_KEY }}
run: echo "$LASTFM_KEY" > lastfm.key
- name: Build
run: cargo build --release -vv
- name: Archive
run: tar -cf- -C target/release konik | xz -c9e - > konik-linux.tar.xz
- name: Save
uses: actions/[email protected]
with:
name: release-linux
path: "*.tar.xz"
release:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build-linux
runs-on: ubuntu-24.04
steps:
- name: Version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
- name: Notes
run: grep -Pzom1 "(?s)\n[##\s]*${{ steps.version.outputs.version }}.*?\n+.*?\K.*?(\n\n|$)" CHANGELOG.md | sed 's/[^[:print:]]//g' > RELEASE.md
- name: Download
uses: actions/[email protected]
with:
path: artifacts
- name: Rename
run: |
mv artifacts/release-linux/konik-linux.tar.xz artifacts/release-linux/konik-linux-${{ steps.version.outputs.version }}.tar.xz
- name: Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
artifacts/release-linux/*.tar.xz
body_path: RELEASE.md