release version 0.4.0 #10
Workflow file for this run
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
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
crossbuild: | |
name: Build Windows | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-pc-windows-gnu | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target=x86_64-pc-windows-gnu | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-binary | |
path: target/x86_64-pc-windows-gnu/release/hrv-rs* | |
build: | |
name: Build Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-pc-windows-gnu | |
override: true | |
- name: Install Dependencies | |
run: sudo apt install libdbus-1-dev pkg-config | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-binary | |
path: target/release/hrv-rs* | |
release: | |
name: Create GitHub Release | |
runs-on: ubuntu-latest | |
needs: [build, crossbuild] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 30 | |
- name: Download Binaries | |
uses: actions/download-artifact@v4 | |
with: | |
path: binaries/ | |
- name: Create GitHub Release | |
uses: actions/create-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
Changes in this Release | |
- First Change | |
- Second Change | |
draft: false | |
prerelease: false | |
- name: Upload Linux binary | |
id: upload-release-asset-linux | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: binaries/linux-binary/hrv-rs | |
asset_name: hrv-rs_x86_64_linux | |
asset_content_type: application/zip | |
- name: Upload Windows binary | |
id: upload-release-asset-windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: binaries/windows-binary/hrv-rs.exe | |
asset_name: hrv-rs_x86_64_windows.exe | |
asset_content_type: application/zip | |