Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Dec 28, 2024
1 parent 0376571 commit a4b8782
Showing 1 changed file with 3 additions and 41 deletions.
44 changes: 3 additions & 41 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,7 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Setup MSBuild v1.1
uses: microsoft/setup-msbuild@v1.1

- name: Setup NuGet v2
uses: NuGet/setup-nuget@v2

- name: Restore packages
run: nuget restore FriishProduce.sln

- 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
uses: softprops/action-gh-release@v2
with:
tag_name: latest
files: FriishProduce_latest.zip
token: ${{ secrets.github_token }} # Required
- name: Get event name
run: |
echo "event name is ${{ github.event_name }}"

0 comments on commit a4b8782

Please sign in to comment.