Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/stowmyy/dropship
Browse files Browse the repository at this point in the history
  • Loading branch information
stowmyy committed Oct 16, 2023
2 parents fe7b5c8 + 9f1d76c commit 6155f75
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ jobs:
- name: Add MSBuild to PATH
uses: microsoft/[email protected]

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

- 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 /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}

- name: version
run: Get-FileHash ${{ env.SOLUTION_FILE_PATH }}\x64\${{ env.BUILD_CONFIGURATION }}\dropship.exe -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File ${{ env.SOLUTION_FILE_PATH }}\x64\${{ env.BUILD_CONFIGURATION }}\version.txt

# Create the release: https://github.com/actions/create-release
- name: Create release
Expand All @@ -59,7 +58,7 @@ jobs:
with:
# TODO use short commit sha ??
tag_name: v${{ github.run_number }}
release_name: dropship ${{ env._date }} (v${{ github.run_number }})
release_name: dropship ${{ env._date }}
draft: false
prerelease: false
body: |
Expand All @@ -80,6 +79,17 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# hardcoded path
asset_path: ${{ env.SOLUTION_FILE_PATH }}\x64\${{ env.BUILD_CONFIGURATION }}\dropship.exe
# TODO version
asset_name: dropship.exe
asset_content_type: application/octet-stream

- name: update version
id: upload-version
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# hardcoded path
asset_path: ${{ env.SOLUTION_FILE_PATH }}\x64\${{ env.BUILD_CONFIGURATION }}\version.txt
asset_name: version.txt
asset_content_type: text/plain

0 comments on commit 6155f75

Please sign in to comment.