Harden desktop release asset publishing #3
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: Horosa Desktop Release | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*.*' | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: Existing git tag to publish or repair | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| env: | |
| RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }} | |
| jobs: | |
| release-desktop: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| fetch-depth: 0 | |
| - name: Checkout requested tag | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| fetch-depth: 0 | |
| ref: refs/tags/${{ env.RELEASE_TAG }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Build portable release assets | |
| shell: pwsh | |
| run: | | |
| $params = @{ | |
| Version = $env:RELEASE_TAG | |
| } | |
| if ($env:GITHUB_EVENT_NAME -eq 'push') { | |
| $params.RequireTagMatch = $true | |
| } | |
| ./desktop_installer_bundle/build_portable_release_zip.ps1 @params | |
| - name: Create or update GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| name: Horosa Desktop ${{ env.RELEASE_TAG }} | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| overwrite_files: true | |
| fail_on_unmatched_files: true | |
| files: | | |
| ./desktop_installer_bundle/release/HorosaPortableWindows-${{ env.RELEASE_TAG }}.zip | |
| ./desktop_installer_bundle/release/HorosaPortableWindows-${{ env.RELEASE_TAG }}.manifest.json |