Skip to content

feat: add chocolatey support #8

feat: add chocolatey support

feat: add chocolatey support #8

Workflow file for this run

name: Build
on:
push:
branches: [ "master" ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Version
id: version
uses: paulhatch/[email protected]
with:
tag_prefix: "v"
namespace: beta
debug: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
- name: Build
run: dotnet build "MouseTrap/MouseTrap.csproj" -c Release -o ./dist
- name: Create Zip
uses: vimtor/[email protected]
with:
files: ./dist/
dest: MouseTrap-${{ steps.version.outputs.version }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mousetrap
path: ${{ github.workspace }}/MouseTrap-${{ steps.version.outputs.version }}.zip
- name: Add Version Tag
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${{ steps.version.outputs.version_tag }}`,
sha: context.sha
})
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ steps.version.outputs.version_tag }}
draft: false
prerelease: true
body: |
MouseTrap is a portable application.
Download the *.zip archive and extract it to some safe place (where you don't delete it by mistake)
and double click mousetrap.exe to run it.
Please download and install [**.NET 8 Runtime**](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) if you have trouble running mousetrap
_in most cases it will notify you with a simple message dialog if the runtime is missing_
[Documentation + Help](https://github.com/r-Larch/MouseTrap/blob/master/README.md)
![#f03c15](https://placehold.it/15/f03c15/000000?text=+) Please Note!!
> The **MouseTrap.exe is not signed!** Because Code signing certificates cost a lot of money.
So in case you get some "Windows protected your PC" warning, just hit "more infos" and then "Run anyway".
Or download the Source Code and Build it on your own.
files: ./MouseTrap-${{ steps.version.outputs.version }}.zip
- name: Push to Chocolatey
env:
CHOCO_TOKEN: ${{ secrets.CHOCO_TOKEN }}
run: pwsh .\MouseTrap\choco\Push.ps1 -nuspec .\MouseTrap\choco\MouseTrap.nuspec -zip ./MouseTrap-${{ steps.version.outputs.version }}.zip -version ${{ steps.version.outputs.version_tag }} -debug