-
Notifications
You must be signed in to change notification settings - Fork 9
65 lines (51 loc) · 1.62 KB
/
release.yml
File metadata and controls
65 lines (51 loc) · 1.62 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
name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
name: Build AppImage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: launcher
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfuse2 libgtk-3-dev libwayland-dev libxkbcommon-dev
- name: Install appimagetool
run: |
wget -q -O appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/appimagetool
- name: Install cargo-appimage
run: cargo install cargo-appimage
- name: Set version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" launcher/Cargo.toml
- name: Build AppImage
working-directory: launcher
run: cargo appimage
- name: Rename artifact
run: |
TAG="${GITHUB_REF_NAME}"
mv launcher/target/appimage/peacock-launcher.AppImage \
"peacock-launcher-${TAG}-x86_64.AppImage"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
make_latest: true
files: peacock-launcher-*-x86_64.AppImage