From 8c7405735fe2102a238f0f9bc7f7188253d3b64d Mon Sep 17 00:00:00 2001 From: AngeloR Date: Wed, 13 Aug 2025 09:38:56 -0400 Subject: [PATCH 1/2] ci: auto build on PR and comment with download links --- .github/workflows/{static.yml => build.yml} | 18 +++++++++++++++--- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 1 - src-tauri/tauri.conf.json | 6 +++--- 5 files changed, 20 insertions(+), 9 deletions(-) rename .github/workflows/{static.yml => build.yml} (76%) diff --git a/.github/workflows/static.yml b/.github/workflows/build.yml similarity index 76% rename from .github/workflows/static.yml rename to .github/workflows/build.yml index 3dbd855..20ae3ee 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: "publish" +name: "build" on: pull_request @@ -6,6 +6,7 @@ jobs: publish-tauri: permissions: contents: write + pull-requests: write strategy: fail-fast: false matrix: @@ -46,12 +47,23 @@ jobs: run: yarn install # change this to npm, pnpm or bun depending on which one you use. - uses: tauri-apps/tauri-action@v0 + id: tauri env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. - releaseName: "App v__VERSION__" + tagName: release-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. + releaseName: "Outliner v__VERSION__" releaseBody: "See the assets to download this version and install." releaseDraft: true prerelease: false args: ${{ matrix.args }} + + - name: Comment PR + uses: thollander/actions-comment-pull-request@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-tag: auto-build-comment-${{ matrix.platform }} + message: | + Build for ${{ matrix.platform }} is done. + Asset Download Links: + ${{ steps.tauri.outputs.artifactPaths }} diff --git a/package.json b/package.json index 56c0fa7..e5a1228 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "outline-browser", - "version": "0.0.1", + "version": "0.0.2", "scripts": { "dev": "npx serve public", "webpack-local": "ENVIRONMENT=development npx webpack -w", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 0157338..c183f3f 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -70,7 +70,7 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "app" -version = "0.1.0" +version = "0.0.2" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 068a701..cb7eddc 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,5 @@ [package] name = "app" -version = "0.1.0" description = "A Tauri App" authors = ["you"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d987fc4..6a71e24 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -40,9 +40,9 @@ } } }, - "productName": "outliner", + "productName": "Outliner", "mainBinaryName": "outliner", - "version": "0.0.1", + "version": "../package.json", "identifier": "com.outliner.xangelo", "plugins": {}, "app": { @@ -60,4 +60,4 @@ "csp": null } } -} \ No newline at end of file +} From 9cded01046182a3a1fb54ac26f9e0f6dbee97ce6 Mon Sep 17 00:00:00 2001 From: AngeloR Date: Wed, 13 Aug 2025 12:02:31 -0400 Subject: [PATCH 2/2] ci: upload artifacts after build --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- src-tauri/Cargo.lock | 2 +- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20ae3ee..950881e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,6 +58,34 @@ jobs: prerelease: false args: ${{ matrix.args }} + - name: Upload linux assets + uses: actions/upload-artifact@v4 + if: matrix.platform == 'ubuntu-22.04' + with: + name: pr-${{github.event.pull_request.number }}-${{ matrix.platform }} + path: | + src-tauri/target/release/bundle/deb/*.deb + src-tauri/target/release/bundle/rpm/*.rpm + src-tauri/target/release/bundle/appimage/*.AppImage + + - name: Upload windows assets + uses: actions/upload-artifact@v4 + if: matrix.platform == 'windows-latest' + with: + name: pr-${{github.event.pull_request.number }}-${{ matrix.platform }} + path: | + src-tauri/target/release/bundle/msi/*.msi + src-tauri/target/release/bundle/nsis/*.exe + + - name: Upload macos assets + uses: actions/upload-artifact@v4 + if: matrix.platform == 'macos-latest' + with: + name: pr-${{github.event.pull_request.number }}-${{ matrix.platform }} + path: | + src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + src-tauri/target/aarch64-apple-darwin/release/bundle/macos/*.app + - name: Comment PR uses: thollander/actions-comment-pull-request@v3 with: @@ -65,5 +93,5 @@ jobs: comment-tag: auto-build-comment-${{ matrix.platform }} message: | Build for ${{ matrix.platform }} is done. - Asset Download Links: + Uploaded Assets: ${{ steps.tauri.outputs.artifactPaths }} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index c183f3f..921199b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -70,7 +70,7 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "app" -version = "0.0.2" +version = "0.0.0" dependencies = [ "serde", "serde_json",