From 4dce5572949d885fee14dbed73e08070bdb44eab Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 2 Nov 2023 17:04:12 +0100 Subject: [PATCH 1/2] Trigger release pipeline on tag --- .github/workflows/tag-release.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index eaf71ae61a..ea154d1436 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -1,4 +1,4 @@ -name: Tag release +name: Release concurrency: group: tag-release cancel-in-progress: false @@ -19,6 +19,8 @@ on: jobs: tag-release: runs-on: ubuntu-latest + outputs: + version: ${{ steps.tag-release.outputs.version }} steps: - name: Fail if branch is not master @@ -33,6 +35,7 @@ jobs: - run: cd scripts && yarn - name: Tag release + id: tag-release run: | cd scripts # setup the username and email. @@ -41,3 +44,23 @@ jobs: BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }} BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"} ./versionCommit.sh $BUMP_TYPE + + + new_version=$(./scripts/getCurrentVersion.sh) + echo "version=$new_version" >> $GITHUB_OUTPUT + + trigger-release: + needs: [tag-release] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: peter-evans/repository-dispatch@v2 + with: + repository: budibase/budibase-deploys + event: release-prod + github_pat: ${{ secrets.GH_ACCESS_TOKEN }} + client-payload: |- + { + "TAG": "${{ needs.tag-release.outputs.version }}" + } From 40c37d51eabc2044e9da712d911913c99978fa49 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 6 Nov 2023 14:14:49 +0100 Subject: [PATCH 2/2] Fix usage --- .github/workflows/tag-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index ea154d1436..b413ced3d2 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -58,8 +58,8 @@ jobs: - uses: peter-evans/repository-dispatch@v2 with: repository: budibase/budibase-deploys - event: release-prod - github_pat: ${{ secrets.GH_ACCESS_TOKEN }} + event-type: release-prod + token: ${{ secrets.GH_ACCESS_TOKEN }} client-payload: |- { "TAG": "${{ needs.tag-release.outputs.version }}"