Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ansani authored Apr 30, 2024
1 parent a69325d commit 97378ef
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,90 @@ on:
push:
tags:
- v*.*.*

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: vc143/Shareaza.sln
RELEASEBUILD_FILE_PATH: vc143/ReleaseBuild.props

permissions:
contents: read

jobs:
workflow_matrix:
runs-on: windows-latest
strategy:
matrix:
platform: [ Win32, x64 ]
type: [ Release, Debug ]
steps:
- name: Checkout GIT sources
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: '5.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: '5.x'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages (zlibwapi)
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore zlibwapi/zlibwapi_143.vcxproj -PackagesDirectory zlibwapi/packages

- name: Restore NuGet packages (Shareaza)
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v1

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild ${{env.SOLUTION_FILE_PATH}} /nologo /v:m /t:Rebuild /p:ForceImportBeforeCppTargets=${{env.RELEASEBUILD_FILE_PATH}} /p:Configuration=${{ matrix.type }} /p:Platform=${{ matrix.platform }} /p:DefineConstants=BUILDFROMMSBUILD /p:RevisionSHA=${{ steps.gitversion.outputs.ShortSha }} /p:RevisionDate=${{ steps.gitversion.outputs.commitDate }} /fl /flp:Summary

- name: Archive Shareaza Release
uses: actions/upload-artifact@v4
with:
name: Shareaza Windows ${{ matrix.platform }} ${{ matrix.type }}
path: setup/builds/*.exe

publish:
needs: workflow_matrix
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: .
github-token: ${{ secrets.GH_PAT }} # token with actions:read permissions on target repo
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R .
- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.RELEASE_PAT }}
draft: true
make_latest: true
generate_release_notes: true
files: |
*.exe
- name: VirusTotal Scan
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VIRUS_TOTAL_API_KEY }}
update_release_body: true
files: |
*.exe

0 comments on commit 97378ef

Please sign in to comment.