-
-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (67 loc) · 2.13 KB
/
release_nightly.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
---
on:
push:
#branches: main
name: Nightly Release
env:
RELEASE_BIN: wireguard_exporter
RELEASE_ADDS: >-
LICENSE-APACHE
LICENSE-MIT
nightly-CHANGELOG.md
README.md
jobs:
nightly-release:
name: Nightly Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-musl
- name: Compile
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target x86_64-unknown-linux-musl
- name: Install CLOG
uses: actions-rs/cargo@v1
with:
command: install
args: clog-cli
- name: Generate Changelog
run: clog -F -o nightly-CHANGELOG.md -i /dev/null
- name: Make artifacts dir
run: mkdir -p artifacts/
- name: Copy all artifacts into dir
run: cp target/x86_64-unknown-linux-musl/release/${{ env.RELEASE_BIN }} ${{ env.RELEASE_ADDS }} artifacts/
- uses: benjlevesque/[email protected]
id: short-sha
- name: Create archive for Linux
run: cd artifacts/ && tar czf ../${{ env.RELEASE_BIN }}-${{ env.SHA }}-x86_64-linux-musl.tar.gz ./*
env:
SHA: ${{ steps.short-sha.outputs.sha }}
- name: Remove previous Nightly Release
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: nightly
repo: kbknapp/wireguard_exporter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Nightly Release
uses: softprops/action-gh-release@v1
with:
name: wireguard_exporter Nightly (${{ env.SHA }})
tag_name: nightly
prerelease: true
body_path: nightly-CHANGELOG.md
files: |
${{ env.RELEASE_BIN }}-${{ env.SHA }}-x86_64-linux-musl.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: kbknapp/wireguard_exporter
SHA: ${{ steps.short-sha.outputs.sha }}