Bump log from 0.4.17 to 0.4.20 (#111) #144
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: CI | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --release | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PowerSession | |
path: target/release/PowerSession.exe | |
publish: | |
needs: build | |
runs-on: windows-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Publish to crates.io | |
run: cargo publish --verbose | |
- name: Get PowerSession artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: PowerSession | |
path: target/release | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: .\target\release\PowerSession.exe | |
- name: Publish to WinGet | |
uses: vedantmgoyal2009/winget-releaser@v2 | |
with: | |
identifier: Watfaq.PowerSession | |
token: ${{ secrets.WINGET_TOKEN }} |