diff --git a/.github/workflows/release-notifier-moonlight.yml b/.github/workflows/release-notifier-moonlight.yml index 9369a7fabc5..3cf18a37746 100644 --- a/.github/workflows/release-notifier-moonlight.yml +++ b/.github/workflows/release-notifier-moonlight.yml @@ -15,13 +15,13 @@ jobs: runs-on: ubuntu-latest steps: - name: discord - uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord + uses: sarisia/actions-status-discord@v1 with: - webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }} + avatar_url: ${{ vars.ORG_LOGO_URL }}256 + color: 0x${{ vars.COLOR_HEX_GREEN }} + description: ${{ github.event.release.body }} nodetail: true nofail: false - username: ${{ secrets.DISCORD_USERNAME }} - avatar_url: ${{ secrets.ORG_LOGO_URL }} title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released - description: ${{ github.event.release.body }} - color: 0xFF4500 + username: ${{ secrets.DISCORD_USERNAME }} + webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }} diff --git a/.github/workflows/update-flathub-repo.yml b/.github/workflows/update-flathub-repo.yml index 21411c77c95..5d5f0aea3cb 100644 --- a/.github/workflows/update-flathub-repo.yml +++ b/.github/workflows/update-flathub-repo.yml @@ -9,7 +9,8 @@ name: Update flathub repo on: release: - types: [released] + types: + - released concurrency: group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" @@ -114,7 +115,7 @@ jobs: out-file-path: "flathub/${{ env.FLATHUB_PKG }}" extract: true - - name: Delete arhive + - name: Delete archive if: >- steps.check-label.outputs.hasTopic == 'true' && steps.check-release.outputs.isLatestRelease == 'true' @@ -172,6 +173,7 @@ jobs: git checkout $main_commit - name: Create/Update Pull Request + id: create-pr if: >- steps.check-label.outputs.hasTopic == 'true' && steps.check-release.outputs.isLatestRelease == 'true' && @@ -185,3 +187,20 @@ jobs: delete-branch: true title: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}" body: ${{ github.event.release.body }} + + - name: Automerge PR + env: + GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + if: >- + steps.check-label.outputs.hasTopic == 'true' && + steps.check-release.outputs.isLatestRelease == 'true' && + fromJson(steps.download.outputs.downloaded_files)[0] + run: | + gh \ + pr \ + merge \ + --auto \ + --delete-branch \ + --repo "flathub/${{ env.FLATHUB_PKG }}" \ + --squash \ + "${{ steps.create-pr.outputs.pull-request-number }}" diff --git a/.github/workflows/update-pacman-repo.yml b/.github/workflows/update-pacman-repo.yml index 92e14dc7cf2..edb95fde6ba 100644 --- a/.github/workflows/update-pacman-repo.yml +++ b/.github/workflows/update-pacman-repo.yml @@ -87,7 +87,16 @@ jobs: out-file-path: "pkgbuilds/${{ steps.prep.outputs.pkg_name }}" extract: true + - name: Remove pkg.tar.gz + if: >- + steps.check-label.outputs.hasTopic == 'true' && + steps.check-release.outputs.isLatestRelease == 'true' && + fromJson(steps.download.outputs.downloaded_files)[0] + run: | + rm -f "pkgbuilds/${{ steps.prep.outputs.pkg_name }}" + - name: Create/Update Pull Request + id: create-pr if: >- steps.check-label.outputs.hasTopic == 'true' && steps.check-release.outputs.isLatestRelease == 'true' && @@ -105,3 +114,19 @@ jobs: labels: | auto-approve auto-merge + + - name: Automerge PR + env: + GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + if: >- + steps.check-label.outputs.hasTopic == 'true' && + steps.check-release.outputs.isLatestRelease == 'true' && + fromJson(steps.download.outputs.downloaded_files)[0] + run: | + gh \ + pr \ + merge \ + --auto \ + --delete-branch \ + --squash \ + "${{ steps.create-pr.outputs.pull-request-number }}"