Skip to content

Commit

Permalink
feat: migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
r-Larch committed Nov 27, 2023
1 parent e492b0f commit 06c97f5
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 503 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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

3 changes: 1 addition & 2 deletions MouseTrap.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{02A88C37-94A2-41A9-82FD-D279583D03D6}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
appveyor.yml = appveyor.yml
build\Create-Artifacts.ps1 = build\Create-Artifacts.ps1
.github\workflows\build.yml = .github\workflows\build.yml
README.md = README.md
EndProjectSection
EndProject
Expand Down
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# MouseTrap

[![Build](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/r-Larch/mousetrap/branch/master)
[![master](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true&passingText=master%20-%20OK)](https://ci.appveyor.com/project/r-Larch/mousetrap/branch/master)
[![Build](https://github.com/r-Larch/MouseTrap/actions/workflows/build.yml/badge.svg)](https://github.com/r-Larch/MouseTrap/actions/workflows/build.yml)

MouseTrap is a small tool to map the cursor between multiple monitors with <br>
different resolutions and scaling settings.
Expand All @@ -19,29 +18,14 @@ For this tool to function correctly you should have:
You can find the latest release here:
> [Download](https://github.com/r-Larch/MouseTrap/releases)
You can install MouseTrap with **chocolatey**:
```Powershell
# install the package
choco install mousetrap
# running it
mousetrap
```

>If you don't have chocolatey allready, I highly recommend installing it.<br>
>It's as simple as pasting the following in a cmd or Powershell window:
>```Powershell
>PowerShell
>Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object >System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
>```
>*[Why Chocolatey](https://chocolatey.org/docs/why) + [installation](https://chocolatey.org/docs/installation)*

## Changelog

### Version 1.0.16

- **Migrate to .NET 8**
- Discontinue `chocolatey` support
- Migrate CI to Github Actions
- Bug fixes

### Version 1.0.15
Expand Down
63 changes: 0 additions & 63 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 06c97f5

Please sign in to comment.