Skip to content

Upload store MSIX to release #175

Upload store MSIX to release

Upload store MSIX to release #175

Workflow file for this run

name: Upload store MSIX to release
permissions:
contents: write
on:
schedule:
- cron: "0 */6 * * *" # Run the action every 6 hours
workflow_dispatch: # Manually run the action
jobs:
check-msix:
runs-on: ubuntu-latest
outputs:
MSIX_ALREADY_EXIST: ${{ steps.check_msix.outputs.MSIX_ALREADY_EXIST }}
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.endsWith('.msix'));
if (msixAsset) {
core.setOutput('MSIX_ALREADY_EXIST', 'true');
console.log('MSIX file exists.');
} else {
core.setOutput('MSIX_ALREADY_EXIST', 'false');
console.log('No MSIX file found in the latest release.');
}
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 }}
msix-to-winget:
name: MSIX to Winget
needs: upload-store-msix-to-release
runs-on: windows-latest
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.log("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 }}