Version 3.8.2 #5
Workflow file for this run
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
name: .NET Release | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: windows-latest | |
#this makes it not run if tests failed. | |
#needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Set envars for versions | |
run: | | |
TAG=${{ github.event.release.tag_name }} | |
VERSION=${TAG#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "SHORT_VERSION=${VERSION%-*}" >> $GITHUB_ENV | |
shell: bash | |
- name: Build X64 | |
run: dotnet publish .\DS4Windows\DS4WinWPF.csproj -c Release /p:platform=x64 /p:AssemblyVersion=${{ env.SHORT_VERSION }} /p:FileVersion=${{ env.SHORT_VERSION }} /p:Version=${{ env.VERSION }} -o .\bin\x64\Release\output | |
- name: Post-Build script X64 | |
run: python .\utils\post-build.py .\bin\x64\Release\output . ${{env.VERSION}} | |
- name: Publish release Build X64 | |
run: gh release upload ${{github.event.release.tag_name}} .\bin\x64\Release\DS4Windows_${{env.VERSION}}_x64.zip | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} | |
- name: Build X86 | |
run: dotnet publish .\DS4Windows\DS4WinWPF.csproj -c Release /p:platform=x86 /p:AssemblyVersion=${{ env.SHORT_VERSION }} /p:FileVersion=${{ env.SHORT_VERSION }} /p:Version=${{ env.VERSION }} -o .\bin\x86\Release\output | |
- name: Post-Build script X86 | |
run: python .\utils\post-build.py .\bin\x86\Release\output . ${{env.VERSION}} | |
- name: Publish release Build X86 | |
run: gh release upload ${{github.event.release.tag_name}} .\bin\x86\Release\DS4Windows_${{env.VERSION}}_x86.zip | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} |