Repository navigation
79 lines (67 loc) · 2.17 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (67 loc) · 2.17 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
69
70
71
72
73
74
75
76
77
78
79
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# This workflow is managed by gh actions-lock.
# Presswerk — Build release binary and create GitHub Release on tag push
name: Release
on:
push:
tags:
- "v*"
permissions:
actions: read
jobs:
build-linux:
name: Build (x86_64-unknown-linux-gnu)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: v1
targets: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2.9.2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxdo-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
- name: Build release binary
run: cargo build --release --target x86_64-unknown-linux-gnu -p presswerk-app
- name: Package binary
run: |
mkdir -p dist
cp target/x86_64-unknown-linux-gnu/release/presswerk-app dist/presswerk-linux-x86_64
chmod +x dist/presswerk-linux-x86_64
- name: Upload artifact
uses: actions/upload-artifact@v7.0.1
with:
name: presswerk-linux-x86_64
path: dist/presswerk-linux-x86_64
retention-days: 7
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build-linux
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7.0.1
- name: Download artifacts
uses: actions/download-artifact@v8.0.1
with:
name: presswerk-linux-x86_64
path: dist/
- name: Create release
uses: softprops/action-gh-release@v3.0.3
with:
generate_release_notes: true
files: |
dist/presswerk-linux-x86_64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest build provenance
uses: actions/attest-build-provenance@v4.2.2
with:
subject-path: 'dist/presswerk-linux-x86_64'