-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (92 loc) · 3.11 KB
/
release.yml
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
name: Release
on:
push:
tags:
- v*
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Release - ${{ matrix.platform.release_for }}
strategy:
fail-fast: false
matrix:
platform:
- release_for: Linux-x86_64-musl
os: ubuntu-latest
target: x86_64-unknown-linux-musl
ext: ""
command: build
- release_for: Linux-aarch64-musl
os: ubuntu-latest
target: aarch64-unknown-linux-musl
ext: ""
command: build
- release_for: Linux-x86_64-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
ext: ""
command: build
- release_for: Linux-aarch64-gnu
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
ext: ""
command: build
- release_for: FreeBSD-x86_64
os: ubuntu-latest
target: x86_64-unknown-freebsd
ext: ""
command: build
- release_for: NetBSD-x86_64
os: ubuntu-latest
target: x86_64-unknown-netbsd
ext: ""
command: build
- release_for: Solaris-x86_64
os: ubuntu-latest
target: x86_64-sun-solaris
ext: ""
command: build
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
ext: .exe
command: build
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
ext: ""
command: build
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
ext: ""
command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install musl-tools
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.release_for, 'musl')
- name: Build
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release --features 'static-openssl'"
strip: true
- name: Publish release artifacts
uses: actions/upload-artifact@v3
with:
name: plegosa_${{ matrix.platform.release_for }}
path: target/${{ matrix.platform.target }}/release/plegosa${{ matrix.platform.ext }}
- name: Rename executable file
run: mv target/${{ matrix.platform.target }}/release/plegosa${{ matrix.platform.ext }} plegosa_${{ matrix.platform.release_for }}${{ matrix.platform.ext }}
- name: Generate SHA-256
run: shasum -a 256 plegosa_${{ matrix.platform.release_for }}${{ matrix.platform.ext }}
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "plegosa_${{ matrix.platform.release_for }}${{ matrix.platform.ext }}"