Release #147
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" | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| workflow_dispatch: | |
| jobs: | |
| continuous-integration: | |
| uses: ./.github/workflows/ci.yml | |
| create-release: | |
| needs: continuous-integration | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| release_id: ${{ steps.create-release.outputs.result }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get version | |
| run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Create release | |
| id: create-release | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const changelogContent = fs.readFileSync('changelog.md', 'utf-8'); | |
| const regex = new RegExp(`(?<=\\[${process.env.PACKAGE_VERSION}\\]\\s)([\\s\\S]*?)(?=\\s## \\[)`, 'g'); | |
| const releaseNotes = changelogContent.match(regex)?.[0].trim() || ''; | |
| const { data } = await github.rest.repos.createRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| tag_name: `v${process.env.PACKAGE_VERSION}`, | |
| name: `Seelen UI v${process.env.PACKAGE_VERSION}`, | |
| body: releaseNotes, | |
| generate_release_notes: true, | |
| draft: true, | |
| prerelease: false, | |
| }); | |
| return data.id; | |
| build: | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: windows-2025 | |
| target: x86_64-pc-windows-msvc | |
| - platform: windows-2025 | |
| target: aarch64-pc-windows-msvc | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| with: | |
| rust-targets: ${{ matrix.target }} | |
| cache-key-prefix: rust-build-${{ matrix.target }} | |
| - name: Install frontend dependencies | |
| run: npm install | |
| - name: Install MSIX dependencies | |
| shell: pwsh | |
| run: | | |
| winget upgrade winget --accept-package-agreements --accept-source-agreements --disable-interactivity --force || Write-Output "Ignoring winget update failure" | |
| winget install --id Microsoft.DotNet.AspNetCore.8 --accept-package-agreements --accept-source-agreements --force | |
| winget install --id Microsoft.DotNet.DesktopRuntime.8 --accept-package-agreements --accept-source-agreements --force | |
| winget install --id MarcinOtorowski.MSIXHero --accept-package-agreements --accept-source-agreements --force | |
| - name: Build Hook DLL | |
| run: cargo build --release --target ${{ matrix.target }} -p sluhk | |
| - name: Build | |
| run: npx tauri build --ci --verbose --no-bundle --target ${{ matrix.target }} | |
| - name: Clean bundle folder from cache | |
| shell: pwsh | |
| run: | | |
| $bundlePath = "target/${{ matrix.target }}/release/bundle" | |
| if (Test-Path $bundlePath) { | |
| Remove-Item -Path $bundlePath -Recurse -Force | |
| Write-Output "Old bundles files deleted: $bundlePath" | |
| } | |
| - name: Bundle | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| run: npx tauri bundle --ci --verbose --target ${{ matrix.target }} | |
| - name: Bundle MSIX | |
| run: npx tsx scripts/bundle.msix.ts --target ${{ matrix.target }} | |
| - name: Upload to artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-bundles-${{ matrix.target }} | |
| path: target/${{ matrix.target }}/release/bundle | |
| merge-artifacts: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| artifact-id: ${{ steps.upload-merged.outputs.artifact-id }} | |
| steps: | |
| - name: Merge artifacts | |
| id: upload-merged | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: build-bundles | |
| pattern: build-bundles-* | |
| delete-merged: true | |
| sign-and-upload: | |
| needs: merge-artifacts | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Submit to SignPath | |
| uses: signpath/github-action-submit-signing-request@v1 | |
| with: | |
| api-token: ${{ secrets.SIGNPATH_API_TOKEN }} | |
| organization-id: 1a9e9b37-229a-4540-a639-137deebee4e1 | |
| project-slug: seelen-ui | |
| signing-policy-slug: release-signing | |
| github-artifact-id: ${{ needs.merge-artifacts.outputs.artifact-id }} | |
| output-artifact-directory: bundles | |
| - name: File Tree | |
| run: |- | |
| tree bundles | |
| - name: Get version | |
| run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Tauri Updater Signature | |
| env: | |
| SIGNING_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| SIGNING_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| run: | | |
| npm install -g @tauri-apps/cli | |
| echo "Removing existing .sig files to regenerate with Tauri updater keys..." | |
| find ./bundles -name "*.sig" -type f -delete | |
| echo "Existing signatures removed" | |
| VERSION=${{ env.PACKAGE_VERSION }} | |
| PATH1="bundles/nsis/Seelen UI_${VERSION}_arm64-setup.exe" | |
| PATH2="bundles/nsis/Seelen UI_${VERSION}_x64-setup.exe" | |
| echo "Signing ${PATH1}..." | |
| tauri signer sign --verbose -k "$SIGNING_KEY" -p "$SIGNING_PASSWORD" "$PATH1" | |
| echo "Signing ${PATH2}..." | |
| tauri signer sign --verbose -k "$SIGNING_KEY" -p "$SIGNING_PASSWORD" "$PATH2" | |
| - name: Upload Signed Installers to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ env.PACKAGE_VERSION }} | |
| files: bundles/**/* | |
| microsoft-store-submission: | |
| needs: sign-and-upload | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-bundles | |
| path: target/release/bundle | |
| # Use Store Broker to publish to Microsoft Store | |
| - name: Submit to Partner Center (aka DevCenter) | |
| shell: pwsh | |
| run: | | |
| ./scripts/SubmitToStore.ps1 | |
| env: | |
| PartnerCenterStoreId: ${{ secrets.MS_PRODUCT_ID }} | |
| PartnerCenterTenantId: ${{ secrets.MS_TENANT_ID }} | |
| PartnerCenterClientId: ${{ secrets.MS_CLIENT_ID }} | |
| PartnerCenterClientSecret: ${{ secrets.MS_CLIENT_SECRET }} | |
| SBDisableTelemetry: true | |
| publish-release: | |
| needs: [create-release, sign-and-upload] | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Publish release | |
| uses: actions/github-script@v7 | |
| env: | |
| releaseId: ${{ needs.create-release.outputs.release_id }} | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| script: | | |
| await github.rest.repos.updateRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| release_id: process.env.releaseId, | |
| draft: false, | |
| }); | |
| generate-update-file: | |
| needs: [create-release, publish-release] | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get version | |
| run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
| - uses: ./.github/actions/generate-update-manifest | |
| with: | |
| release-id: ${{ needs.create-release.outputs.release_id }} | |
| version: ${{ env.PACKAGE_VERSION }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| discord: | |
| needs: publish-release | |
| name: Send Announcement To Discord Server | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Discord notification | |
| uses: LeGitHubDeTai/github-to-discord@main | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| DISCORD_USERNAME: Seelen | |
| DISCORD_AVATAR: https://raw.githubusercontent.com/eythaann/Seelen-UI/master/documentation/images/logo_with_margins.png | |
| AUTHOR_NAME: eythaann | |
| AUTHOR_URL: "https://github.com/eythaann" | |
| AUTHOR_AVATAR: "https://avatars.githubusercontent.com/u/76607907?v=4" | |
| MESSAGE_TITLE: Seelen UI | |
| MESSAGE_DESCRIPTION: A new release of Seelen UI has been published | |
| MESSAGE_COLOR: 5814783 | |
| SECTION_NAME: "ChangeLog" | |
| FOOTER_TEXT: "Seelen Inc." | |
| FOOTER_URL: "https://github.com/eythaann/seelen-ui" | |
| publish-core-library: | |
| needs: publish-release | |
| uses: ./.github/workflows/publish-core.yml | |
| secrets: inherit |