-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-packages.yml
More file actions
95 lines (84 loc) · 2.62 KB
/
linux-packages.yml
File metadata and controls
95 lines (84 loc) · 2.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
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
# Linux packages: .deb (Debian/Ubuntu), .rpm (RHEL/Fedora), .apk (Alpine)
name: Linux Packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
permissions:
contents: write
jobs:
validate:
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
version: ${{ steps.validate.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: michaelklishin/rust-build-package-release-action@v1
id: validate
with:
command: validate-version
packages:
needs: validate
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- format: deb
command: release-linux-deb
target: x86_64-unknown-linux-gnu
- format: deb
command: release-linux-deb
target: aarch64-unknown-linux-gnu
- format: rpm
command: release-linux-rpm
target: x86_64-unknown-linux-gnu
- format: rpm
command: release-linux-rpm
target: aarch64-unknown-linux-gnu
- format: apk
command: release-linux-apk
target: x86_64-unknown-linux-musl
- format: apk
command: release-linux-apk
target: aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal
- uses: michaelklishin/rust-build-package-release-action@v1
id: build
with:
command: ${{ matrix.command }}
target: ${{ matrix.target }}
locked: 'true'
pkg-maintainer: 'Your Name <you@example.com>'
pkg-description: 'A command-line tool'
pkg-homepage: 'https://github.com/you/project'
pkg-license: 'MIT'
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.format }}-${{ matrix.target }}
path: ${{ steps.build.outputs.artifact_path }}
release:
needs: [validate, packages]
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: michaelklishin/rust-build-package-release-action@v1
with:
command: extract-changelog
version: ${{ needs.validate.outputs.version }}
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Collect packages
run: |
mkdir -p release
find artifacts -type f \( -name "*.deb" -o -name "*.rpm" -o -name "*.apk" \) -exec cp {} release/ \;
- uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
files: release/*