Repository navigation
68 lines (63 loc) · 1.85 KB
/
Copy pathrelease.yml
File metadata and controls
68 lines (63 loc) · 1.85 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
name: release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: -C link-arg=-fuse-ld=mold
jobs:
packages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: rust
- uses: taiki-e/install-action@v2
with:
tool: cargo-deb,cargo-generate-rpm
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libwayland-dev libxkbcommon-dev mold clang
- name: Install linuxdeploy
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
- name: Build packages
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
LINUXDEPLOY: ${{ github.workspace }}/linuxdeploy-x86_64.AppImage
run: packaging/build.sh
- uses: actions/upload-artifact@v7
with:
name: packages
path: |
target/debian/*.deb
target/generate-rpm/*.rpm
target/appimage/*.AppImage
if-no-files-found: error
release:
needs: [packages]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- uses: softprops/action-gh-release@v3
with:
files: |
dist/**/*.deb
dist/**/*.rpm
dist/**/*.AppImage
generate_release_notes: true