first commit #1
Workflow file for this run
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: Release StickyNote Installers | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Publish Slim binaries (x64/x86) | |
| shell: pwsh | |
| run: | | |
| dotnet publish StickyNote.csproj -c Release -r win-x64 /p:PublishSingleFile=true /p:SelfContained=false -o publish-slim/win-x64 | |
| dotnet publish StickyNote.csproj -c Release -r win-x86 /p:PublishSingleFile=true /p:SelfContained=false -o publish-slim/win-x86 | |
| - name: Publish Self-contained binaries (x64/x86) | |
| shell: pwsh | |
| run: | | |
| dotnet publish StickyNote.csproj -c Release -r win-x64 /p:PublishSingleFile=true /p:SelfContained=true /p:IncludeNativeLibrariesForSelfExtract=true -o publish-sc/win-x64 | |
| dotnet publish StickyNote.csproj -c Release -r win-x86 /p:PublishSingleFile=true /p:SelfContained=true /p:IncludeNativeLibrariesForSelfExtract=true -o publish-sc/win-x86 | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: | | |
| choco install innosetup -y | |
| - name: Compile installers (Slim & Full x64/x86) | |
| shell: pwsh | |
| run: | | |
| $iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" | |
| & $iscc 'installer\StickyNote_slim.iss' /DArch=x64 | |
| & $iscc 'installer\StickyNote_slim.iss' /DArch=x86 | |
| & $iscc 'installer\StickyNote_sc.iss' /DArch=x64 | |
| & $iscc 'installer\StickyNote_sc.iss' /DArch=x86 | |
| - name: Upload installers artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sticky-note-installers | |
| path: | | |
| installer/out/*.exe | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: StickyNote ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload asset Slim x64 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: installer/out/StickyNote_Setup_Slim_x64.exe | |
| asset_name: StickyNote_Setup_Slim_x64.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload asset Slim x86 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: installer/out/StickyNote_Setup_Slim_x86.exe | |
| asset_name: StickyNote_Setup_Slim_x86.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload asset Full x64 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: installer/out/StickyNote_Setup_x64.exe | |
| asset_name: StickyNote_Setup_x64.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload asset Full x86 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: installer/out/StickyNote_Setup_x86.exe | |
| asset_name: StickyNote_Setup_x86.exe | |
| asset_content_type: application/octet-stream |