diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 69aa2816..789e1f4c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,6 +19,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Get current date + run: | + $DATE=& Get-Date -format yyyy-MM-dd + echo "DATE=$DATE" >> $env:GITHUB_ENV + + - name: Get commit SHA + run: | + set a=${{ github.sha }} + echo "SHORT_SHA=%a:~0,7%" >> $GITHUB_ENV + echo Commit SHA is %a:~0,7% + - name: Setup MSBuild v1.1 uses: microsoft/setup-msbuild@v1.1 @@ -30,33 +41,22 @@ jobs: - name: Build solution run: msbuild FriishProduce\FriishProduce.csproj -t:rebuild -property:Configuration=Release - - - name: Get current date - run: | - $DATE=& Get-Date -format yyyy-MM-dd - echo "DATE=$DATE" >> $env:GITHUB_ENV - - - name: Get commit hash - id: commit - uses: prompt/actions-commit-hash@v3 - name: Compress archive run: Compress-Archive -Path FriishProduce\bin\Release\* -DestinationPath FriishProduce_latest.zip - - - name: Update release - id: update_release - uses: tubone24/update_release@v1.3.1 - env: - GITHUB_TOKEN: ${{ secrets.github_token }} - TAG_NAME: latest - with: - release_name: "Latest build (${{ steps.commit.outputs.short }})" - body: "This is the latest build as of ${{ env.DATE }}, autogenerated from the most recent commit.\n\n**How to update manually:**\nreplace the files in your FriishProduce directory with the newer ones, and delete any leftover files or folders that are no longer needed." - is_append_body: false - - name: Upload to release + - name: Upload release uses: softprops/action-gh-release@v2 with: tag_name: latest files: FriishProduce_latest.zip + append_body: false + draft: false + prerelease: true + name: "Latest build ${{ env.SHORT_SHA }}" + body: "This is the latest build as of ${{ env.DATE }}, autogenerated from the most recent commit ${{ env.SHORT_SHA }}.\n\n + **How to update manually:** + \n * Extract the files to your FriishProduce directory, overwriting the older versions, and delete any leftover files or folders that are no longer needed. + \n * It is recommended to also clear your previous settings by deleting the FriishProduce folder in your user's local app data directory.\n\n + Be sure to read [the wiki](https://catmanfan.github.io/friishproduce-wiki/about) for instructions and further details." token: ${{ secrets.github_token }} # Required \ No newline at end of file