publish #11
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: "publish" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - release | |
| jobs: | |
| publish-tauri: | |
| permissions: | |
| contents: write | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node (LTS) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - name: Install frontend dependencies | |
| run: npm install | |
| - name: Build and Publish Tauri App | |
| uses: tauri-apps/tauri-action@v0.5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: app-v__VERSION__ | |
| releaseName: "App v__VERSION__" | |
| releaseBody: "See the assets to download this version and install." | |
| releaseDraft: false | |
| prerelease: false | |
| includeUpdaterJson: true | |
| - name: "Debug: list release assets" | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const release = await github.rest.repos.getLatestRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo | |
| }); | |
| console.log('Latest release tag:', release.data.tag_name); | |
| console.log('Assets:'); | |
| for (const a of release.data.assets) { | |
| console.log(`${a.name} -> ${a.browser_download_url}`); | |
| } |