From 056fbcb0e74834d7173ae4360ecaeef718c96b10 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 19 May 2025 22:44:23 +0200 Subject: [PATCH] Trigger pipeline build when a release tag is pushed (#4741) --- .github/workflows/post-release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/post-release.yml diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml new file mode 100644 index 0000000000..56d40d0cf6 --- /dev/null +++ b/.github/workflows/post-release.yml @@ -0,0 +1,28 @@ +name: Post-release + +on: + push: + tags: + - 'v*' + +jobs: + post-release: + runs-on: ubuntu-latest + # Skip in forks + if: github.repository == 'element-hq/element-x-android' + + steps: + - name: Trigger pipeline + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.ENTERPRISE_ACTIONS_TOKEN }} + script: | + const tag = context.ref.replace('refs/tags/', ''); + const inputs = { git_tag: tag }; + await github.rest.actions.createWorkflowDispatch({ + owner: 'element-hq', + repo: 'element-enterprise', + workflow_id: 'pipeline-android.yml', + ref: 'main', + inputs: inputs + });