Skip to content

Commit

Permalink
Update dotnet-desktop.yml
Browse files Browse the repository at this point in the history
- Fixes paths
  • Loading branch information
FalcoGer authored Jan 19, 2024
1 parent b09988d commit 77b7d7c
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,54 +74,32 @@ jobs:
- name: Restore the Application
run: msbuild . /t:Restore /p:Configuration=$env:Configuration /p:Platform="Any CPU" /p:RestorePackagesConfig=true
env:
Configuration: ${{ matrix.configuration }}
Configuration: ${{matrix.configuration}}

# Create the app package by building
- name: Build
run: msbuild Installer /t:Build /p:Configuration=$env:Configuration /p:Platform=AnyCPU /p:Version=$env:Major.$env:Minor.$env:Patch
env:
Configuration: ${{ matrix.configuration }}

# DEBUG
- name: Debug output
run: ls -Recurse

# Prepare release folder structure
- name: Move CoordinateConverter.lua
run: mv ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\DCS\Communication\CoordinateConverter.lua ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\CoordinateConverter.lua

- name: Move Resources
run: mv ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\Resources\*.* ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\

# ZIP the directory
# TheDoctor0/zip-release
- name: Zip Release
uses: TheDoctor0/[email protected]
with:
type: zip
filename: Release.zip
directory: ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US
path: .
exclusions: "*.pdb *.xml *.exe.config *.zip"
Configuration: ${{matrix.configuration}}

# Rename the Artifact
- name: Rename Release.zip
run: mv ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\Release.zip ${{env.Project_Directory}}\bin\${{matrix.configuration}}\en-US\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip
run: mv ${{env.Project_Directory}}\bin\${{matrix.configuration}}\Release.zip ${{env.Project_Directory}}\bin\${{matrix.configuration}}\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip

# Upload the Artifact: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: artifact
path: ${{ env.Project_Directory }}\bin\${{matrix.configuration}}\en-US\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip
name: ZIP
path: ${{env.Project_Directory}}\bin\${{matrix.configuration}}\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip

# create/update release with the artifact
# https://github.com/ncipollo/release-action/blob/main/README.md
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: ${{ env.Project_Directory }}\bin\${{matrix.configuration}}\en-US\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip
artifacts: ${{env.Project_Directory}}\bin\${{matrix.configuration}}\Release-${{env.Major}}-${{env.Minor}}-${{env.Patch}}.zip
name: "$env:Major.$env:Minor.$env:Patch"
body: "Automatically generated"
omitBodyDuringUpdate: true
Expand Down

0 comments on commit 77b7d7c

Please sign in to comment.