-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 1.67 KB
/
releaser.yaml
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
name: goreleaser
on:
push:
# run only against tags
tags:
- '*'
permissions:
contents: write
# packages: write
issues: write
jobs:
build:
# runs-on: ubuntu-latest
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
- {os: ubuntu-latest, target: x86_64-unknown-linux-gnu}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch all tags
run: git fetch --force --tags
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
- uses: Swatinem/rust-cache@v2
- name: Build on ${{ matrix.job.target }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target=${{ matrix.job.target }}
- uses: actions/upload-artifact@v4
with:
name: raffi-${{ matrix.job.target }}
path: target/${{ matrix.job.target }}/release/raffi
goreleaser:
name: Goreleaser over Rust
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: raffi-x86_64-unknown-linux-gnu
path: target/linux_amd64/raffi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_PRIVATE_KEY: ${{ secrets.AUR_PRIVATE_KEY }}