From b9aabdd6160553ac322b34c05080d6c699172bd7 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 28 Dec 2024 09:44:03 +0900 Subject: [PATCH] WORKFLOW: enhanced for PR and posting on PR, renamed --- .../{build_release.yml => build_retrodeck.yml} | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) rename .github/workflows/{build_release.yml => build_retrodeck.yml} (93%) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_retrodeck.yml similarity index 93% rename from .github/workflows/build_release.yml rename to .github/workflows/build_retrodeck.yml index 2376867c..cc3e18a5 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_retrodeck.yml @@ -188,6 +188,7 @@ jobs: - name: Generate a token for Rekku id: generate-rekku-token uses: actions/create-github-app-token@v1 + if: github.event_name != 'pull_request' with: app-id: ${{ vars.REKKU_APP_ID }} private-key: ${{ secrets.REKKU_PRIVATE_KEY }} @@ -231,7 +232,22 @@ jobs: RetroDECK*.flatpak.sha RetroDECK*Artifact.tar.gz + - name: Post PR comment with artifacts + if: github.event_name == 'pull_request' + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + header: "RetroDECK Build Artifacts" + message: | + A build for this pull request has completed successfully. + Codenname: ${{ steps.version-tag.outputs.TAG }} + Here are the artifacts to install and test: + - RetroDECK Flatpak: [RetroDECK.flatpak](./retrodeck-artifacts/RetroDECK.flatpak) + - SHA256 Checksum: [RetroDECK.flatpak.sha](./retrodeck-artifacts/RetroDECK.flatpak.sha) + - Artifact Bundle: [RetroDECKArtifact.tar.gz](./retrodeck-artifacts/RetroDECKArtifact.tar.gz) + GitHub-publish: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest needs: Build_RetroDECK env: @@ -243,6 +259,7 @@ jobs: - name: Generate a token for Rekku id: generate-rekku-token uses: actions/create-github-app-token@v1 + if: github.event_name != 'pull_request' with: app-id: ${{ vars.REKKU_APP_ID }} private-key: ${{ secrets.REKKU_PRIVATE_KEY }}