-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (69 loc) · 1.96 KB
/
deploy.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
name: Deployment
on:
push:
tags:
- v*
jobs:
test:
uses: ./.github/workflows/test.yml
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Build
run: cargo build --release --locked
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: milcheck
path: ./target/release/milcheck
gh-release:
name: Publish Github Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download binary artifact
uses: actions/download-artifact@v3
with:
name: milcheck
path: ./target/release/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/release/milcheck
aur-packaging:
name: Publish AUR package
needs: gh-release
runs-on: ubuntu-latest
env:
PKG_NAME: milcheck
PKGBUILD: ./.pkg/aur/PKGBUILD
RELEASE_TAG: ${{ github.ref_name }}
REPOSITORY: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download sources
run: curl -LfsSo "$PKG_NAME-$RELEASE_TAG".tar.gz "https://github.com/$REPOSITORY/archive/refs/tags/$RELEASE_TAG.tar.gz"
- name: Update PKGBUILD
run: ./.pkg/aur/update.sh
- name: Show PKGBUILD
run: cat "$PKGBUILD"
- name: Publish
uses: KSXGitHub/github-actions-deploy-aur@v2.6.0
with:
pkgname: ${{ env.PKG_NAME }}
pkgbuild: ${{ env.PKGBUILD }}
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: ${{ github.ref_name }}