Interface update part 2: #254
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- FriishProduce/** | |
- .github/workflows/dotnet.yml | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- FriishProduce/** | |
- .github/workflows/dotnet.yml | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup MSBuild v1.1 | |
uses: microsoft/[email protected] | |
- 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 /p:PublicRelease=false | |
- name: Build archive | |
run: Compress-Archive -Path FriishProduce\bin\Release\* -DestinationPath FriishProduce_latest.zip | |
- name: Get current date | |
run: | | |
$DATE=& Get-Date -format yyyy-MM-dd | |
echo "DATE=$DATE" >> $env:GITHUB_ENV | |
- name: Get commit SHA | |
shell: bash | |
run: echo "HASH=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV | |
- name: VirusTotal scan | |
id: virustotal | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
update_release_body: false | |
files: | | |
FriishProduce_latest.zip | |
- name: Get VirusTotal scan URL | |
shell: PowerShell | |
run: | | |
$SUB = "${{ steps.virustotal.outputs.analysis }}".substring(25) | |
echo "VT=$SUB" >> $env:GITHUB_ENV | |
- 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.HASH }})" | |
body: "This is the latest build as of ${{ env.DATE }}, autogenerated from the most recent commit ${{ env.HASH }}.\n | |
**It is recommended to use THIS instead of the latest official but unstable release (v1.5)!**\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/) for instructions and further details.\n\n | |
🛡 [VirusTotal GitHub Action](https://github.com/crazy-max/ghaction-virustotal) analysis: | |
\n * [`FriishProduce_latest.zip`](${{ env.VT }})" | |
token: ${{ secrets.github_token }} # Required |