Skip to content

Commit

Permalink
Automated builds and releases using GitHub Actions (#56)
Browse files Browse the repository at this point in the history
* Automated builds and releases using GitHub Actions

* Automated builds and releases using GitHub Actions

* Automated builds and releases using GitHub Actions
  • Loading branch information
sharkusmanch authored Mar 6, 2024
1 parent a6eb912 commit 6f1c5ab
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 60 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/main.yml → .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: |
pip install invoke pyyaml
invoke build
mkdir tmp
curl -L -O https://github.com/JosefNemec/Playnite/releases/download/10.32/Playnite1032.zip
unzip Playnite1032.zip -d tmp/playnite
invoke pack --toolbox ./tmp/playnite/Toolbox.exe

- uses: actions/upload-artifact@v4
- uses: robinraju/release-downloader@v1.8
id: download_playnite
with:
name: artifacts
path: |
dist/*.pext
dist/*.zip
repository: "JosefNemec/Playnite"
latest: true
tarBall: false
zipBall: false
fileName: "Playnite*.zip"
out-file-path: playnite
extract: true

- run: |
dotnet build src -c Release
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: "Release"

on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: robinraju/release-downloader@v1.8
id: download_playnite
with:
repository: "JosefNemec/Playnite"
latest: true
tarBall: false
zipBall: false
fileName: "Playnite*.zip"
out-file-path: playnite
extract: true

- run: |
dotnet build src -c Release
playnite/Toolbox.exe pack src/bin/Release/net462/ dist
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
dist/*.pext
release:
name: "Release"
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Get Version
id: version
uses: mikefarah/yq@master
with:
cmd: yq '.Version' extension.yaml

- name: Pull artifacts
uses: actions/download-artifact@v4
with:
name: artifacts

- run: |
mv LudusaviRestic_*.pext LudusaviRestic_v${{ steps.version.outputs.result }}.pext
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.ACTIONS_TOKEN }}"
prerelease: false
automatic_release_tag: "v${{ steps.version.outputs.result }}"
files: |
*.pext
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
bin/
dist/
.distraw/
obj/
tmp/
*.sln
*.pext
46 changes: 0 additions & 46 deletions tasks.py

This file was deleted.

0 comments on commit 6f1c5ab

Please sign in to comment.