Fix ci/cd #5
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
name: Windows Build | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: logstatter - latest | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
windows_version: | |
- 10 | |
- 11 | |
arch: | |
- x86_64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up pkgconfiglite | |
run: choco install pkgconfiglite | |
- name: Set up Rust | |
run: choco install rust -y | |
- name: Build and test | |
run: cargo build --verbose | |
- name: Create tag | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
git tag "latest/windows" | |
git push origin "latest/windows" | |
- name: Create Windows Release | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: target/release/logstatter.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAG: latest/windows |