Pull MSIX from Store #1344
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: Pull MSIX from Store | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Run the action every day | |
| workflow_dispatch: # Manually run the action | |
| jobs: | |
| check-msix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| MSIX_ALREADY_EXIST: ${{ steps.check_msix.outputs.result }} | |
| steps: | |
| - name: Check for MSIX file in latest release | |
| id: check_msix | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const latestRelease = await github.rest.repos.getLatestRelease({ owner, repo }); | |
| // Check if .msix file exists in the release assets | |
| const msixAsset = latestRelease.data.assets.find(asset => asset.name.toLowerCase().endsWith('.msix')); | |
| return msixAsset ? 'true' : 'false'; | |
| result-encoding: string | |
| - name: Debug output | |
| run: echo "MSIX_ALREADY_EXIST value is ${{ steps.check_msix.outputs.result }}" | |
| upload-store-msix-to-release: | |
| name: Upload Signed MSIX to release | |
| needs: check-msix | |
| if: ${{ needs.check-msix.outputs.MSIX_ALREADY_EXIST == 'false' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Upload store MSIX to release | |
| uses: JasonWei512/Upload-Microsoft-Store-MSIX-Package-to-GitHub-Release@v1 | |
| with: | |
| store-id: 9P67C2D4T9FB | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| asset-name-pattern: Seelen.UI_{version}_{arch} | |
| msix-to-winget: | |
| name: MSIX to Winget | |
| needs: upload-store-msix-to-release | |
| runs-on: windows-2025 | |
| steps: | |
| - name: Get Latest Release | |
| id: get-version | |
| uses: actions/github-script@v7 | |
| with: | |
| script: |- | |
| const { owner, repo } = context.repo; | |
| const latestRelease = await github.rest.repos.getLatestRelease({ owner, repo }); | |
| const tag = latestRelease.data.tag_name; | |
| const version = tag.replace("v", "") + ".0"; | |
| core.setOutput('version', version); | |
| core.setOutput('release-tag', tag); | |
| console.info("Release tag: ", tag, " Version: ", version); | |
| - uses: vedantmgoyal9/winget-releaser@main | |
| with: | |
| identifier: Seelen.SeelenUI | |
| version: ${{ steps.get-version.outputs.version }} | |
| release-tag: ${{ steps.get-version.outputs.release-tag }} | |
| installers-regex: '\.msix$' | |
| fork-user: eythaann | |
| token: ${{ secrets.WINGET_TOKEN }} |