From 08e2efbf4d9c836a65045be02fdc2bead7286cf3 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Fri, 11 Oct 2024 19:28:29 +0530 Subject: [PATCH] ci: Add workflow to automate releases Needs https://github.com/flathub/org.flatpak.Builder/pull/265 and https://github.com/flathub-infra/flatpak-github-actions/pull/12 --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d055239f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Trigger release + +on: + workflow_run: + workflows: [Docker] + types: [completed] + branches: [master] + workflow_dispatch: + + +jobs: + release: + runs-on: ubuntu-latest + if: github.repository == 'flathub-infra/flatpak-builder-lint' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[release]') + steps: + - name: Trigger workflow in org.flatpak.Builder repository + uses: peter-evans/repository-dispatch@v3 + with: + repository: flathub/org.flatpak.Builder + event-type: trigger-workflow + client-payload: '{"sha": "${{ github.event.head_commit.id }}"}' + token: ${{ secrets.LINTER_TRIGGER_WORKFLOW_TOKEN }} + + - name: Trigger workflow in flathub-infra/flatpak-github-actions + uses: peter-evans/repository-dispatch@v3 + with: + repository: flathub-infra/flatpak-github-actions + event-type: trigger-workflow + token: ${{ secrets.LINTER_TRIGGER_WORKFLOW_TOKEN }}