-
-
Notifications
You must be signed in to change notification settings - Fork 19
115 lines (107 loc) · 3.21 KB
/
Copy pathrelease.yml
File metadata and controls
115 lines (107 loc) · 3.21 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
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
name: Release
on:
push:
tags:
- "v[0-9]+.*"
permissions:
contents: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
artifact: sio-linux-x86_64
- target: aarch64-unknown-linux-gnu
artifact: sio-linux-aarch64
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
run: cargo build --release --all-features --target ${{ matrix.target }}
- name: Package
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../${{ matrix.artifact }}.tar.gz sio
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}.tar.gz
publish-crate:
name: Publish to crates.io
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Publish
run: cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
github-release:
name: GitHub Release
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/**/*.tar.gz
publish-aur:
name: Publish to AUR
needs: [github-release]
permissions:
contents: read
uses: ./.github/workflows/publish-aur.yml
with:
tag: ${{ github.ref_name }}
package: siomon
secrets:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
PKG_GIT_NAME: ${{ secrets.PKG_GIT_NAME }}
PKG_GIT_EMAIL: ${{ secrets.PKG_GIT_EMAIL }}
publish-ppa:
name: Publish to PPA
needs: [github-release]
permissions:
contents: read
actions: write
uses: ./.github/workflows/publish-ppa.yml
with:
tag: ${{ github.ref_name }}
series: 'noble questing'
ppa: 'ppa:level1techs/siomon'
upload: true
secrets:
PKG_GPG_PRIVATE_KEY: ${{ secrets.PKG_GPG_PRIVATE_KEY }}
PKG_GPG_PASSPHRASE: ${{ secrets.PKG_GPG_PASSPHRASE }}
PKG_GPG_KEY_ID: ${{ secrets.PKG_GPG_KEY_ID }}
PKG_GIT_NAME: ${{ secrets.PKG_GIT_NAME }}
PKG_GIT_EMAIL: ${{ secrets.PKG_GIT_EMAIL }}
LAUNCHPAD_SSH_PRIVATE_KEY: ${{ secrets.LAUNCHPAD_SSH_PRIVATE_KEY }}
LAUNCHPAD_LOGIN: ${{ secrets.LAUNCHPAD_LOGIN }}