Release build for Wiinject #1
This file contains hidden or 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: Wiinject Release | |
| run-name: "Release build for Wiinject" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Release version | |
| required: true | |
| type: string | |
| releaseNotes: | |
| description: Release notes | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| type: | |
| - { rid: 'linux-x64', image: 'ubuntu-latest' } | |
| - { rid: 'linux-arm64', image: 'ubuntu-24.04-arm' } | |
| - { rid: 'osx-x64', image: 'macos-latest' } | |
| - { rid: 'osx-arm64', image: 'macos-latest' } | |
| - { rid: 'win-x64', image: 'windows-latest' } | |
| - { rid: 'win-arm64', image: 'windows-latest' } | |
| runs-on: ${{ matrix.type.image }} | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4.1.0 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Build & Publish Wiinject | |
| run: dotnet publish ./Haroohie.Wiinject.Cli/Haroohie.Wiinject.Cli.csproj -c Release -f net8.0 -r ${{ matrix.type.rid }} --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true | |
| env: | |
| WiinjectVersion: ${{ inputs.version }} | |
| - name: Create zip | |
| shell: pwsh | |
| run: | | |
| Compress-Archive -Path ./Haroohie.Wiinject.Cli/bin/Release/net8.0/${{ matrix.type.rid }}/publish/ -DestinationPath ./Haroohie.Wiinject.Cli/bin/Release/net8.0/${{ matrix.type.rid }}/Wiinject-${{ inputs.version }}-${{ matrix.type.rid }}.zip | |
| - name: Upload Windows zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.type.rid }} | |
| path: ./Haroohie.Wiinject.Cli/bin/Release/net8.0/${{ matrix.type.rid }}/Wiinject-${{ inputs.version }}-${{ matrix.type.rid }}.zip | |
| retention-days: 1 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download linux-x64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: linux-x64 | |
| - name: Download linux-arm64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: linux-arm64 | |
| - name: Download macos-x64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: osx-x64 | |
| - name: Download macos-arm64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: osx-arm64 | |
| - name: Download win-x64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: win-x64 | |
| - name: Download win-arm64 | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: win-arm64 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Wiinject v${{ inputs.version }} | |
| tag_name: ${{ inputs.version }} | |
| prerelease: false | |
| generate_release_notes: true | |
| files: ./* | |
| body: ${{ inputs.releaseNotes }} |