Merge pull request #5 from furmur/feature/add_metric/wireguard_peer_e… #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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/short-sha@v1.2 | |
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/delete-tag-and-release@v0.2.0 | |
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 }} |