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
name: Release binary auto-uploader | |
on: | |
release: | |
types: [created] | |
jobs: | |
release: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Release Binaries | |
run: cargo build --release | |
- name: Add artifacts to GH release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/release/uattool.exe | |
README.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push release to Chocolatey | |
run: | | |
$env:VERSION_STRING = $env:GH_REF_NAME.trimStart("v") | |
choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ | |
choco pack .\uattool.nuspec --version="$env:VERSION_STRING" | |
choco push --source https://push.chocolatey.org/ | |
env: | |
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} | |
GH_REF_NAME: ${{ github.ref_name }} |