Skip to content

Commit

Permalink
Fix: Issue #5
Browse files Browse the repository at this point in the history
Description: Issue with lingering process has been resolved. All resources are now released when the app is closed, but it does sometimes take a bit of time for the backgroundworker to finish. In future, we need to add a message to tell user to wait a bit while the worker finishes
  • Loading branch information
Cyber-Finn committed Jul 7, 2024
2 parents 67d27ac + 292ff30 commit 3c1125e
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build-and-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Upload Artifact
on:
push:
branches:
- main
- release

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x' #this app uses 4.8, but newer versions should be backwards compatible

# dotnet 4.8 isn't available for github actions, so have to do workaround
- name: Build C# project
run: dotnet build --configuration Release

#- name: Build project
#run: msbuild Windsong_Lyre.sln /p:Configuration=Release

- name: Create artifact
# the "bin/Release/" refers to where our C# app builds its binaries once we've compiled/built. We need to copy from here to a location on github
# the Action will build the app and deploy it to this same location - so we're indeed using the file we built above - it's just a bit weird because it checks our config to figure out where to place/fetch the file
run: |
mkdir -p artifacts
cp -r Windsong_Lyre/bin/Release/* artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: automated-windsong-lyre
path: artifacts/
66 changes: 66 additions & 0 deletions .github/workflows/upload-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Create Release
on:
pull_request:
branches:
- release
types:
- closed
push:
branches:
- release

jobs:
release:
runs-on: windows-latest
permissions:
contents: write
actions: write
attestations: write
steps:
- name: Checkout code
uses: actions/checkout@v2

# This is how we give the release some meaningful info - based off the last commit message and description
- name: Get last commit message
id: get_commit_message
#run: echo "::set-output name=commit_message::$(git log -1 --pretty=format:'%s%n%n%b')"
run: echo "commit_message=$(git log -1 --pretty=format:'%s%n%n%b')" >> $GITHUB_ENV

#- name: Get latest tag
# id: get_latest_tag
#run: echo "::set-output name=tag::$(git describe --abbrev=0 --tags)"

#- name: Increment tag
# id: increment_tag
#run: echo "::set-output name=tag::$(python increment_tag.py ${{ steps.get_latest_tag.outputs.tag }})"


- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: Automated Windsong Lyre Download
tag_name: v1.0.0 #todo: automate this incrementation later on
body: ${{ env.commit_message }}
#body: ${{ github.event.pull_request.title }} # Use the pull request title only as the release info
#body: ${{ steps.get_commit_message.outputs.commit_message }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: automated-windsong-lyre
path: ./downloaded-artifact/

- name: Upload release asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./downloaded-artifact/*
asset_name: automated-windsong-lyre.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file not shown.
Binary file not shown.

0 comments on commit 3c1125e

Please sign in to comment.