Release #463
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
concurrency: | |
group: tag-release | |
cancel-in-progress: false | |
on: | |
workflow_dispatch: | |
inputs: | |
versioning: | |
type: choice | |
description: "Versioning type: patch, minor, major" | |
default: patch | |
options: | |
- patch | |
- minor | |
- major | |
required: true | |
jobs: | |
tag-release: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.tag-release.outputs.version }} | |
steps: | |
- name: Fail if branch is not master | |
if: github.ref != 'refs/heads/master' | |
run: | | |
echo "Ref is not master, you must run this job from master." | |
exit 1 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- run: cd scripts && yarn | |
- name: Tag release | |
id: tag-release | |
run: | | |
cd scripts | |
# setup the username and email. | |
git config --global user.name "Budibase Staging Release Bot" | |
git config --global user.email "<>" | |
BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }} | |
BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"} | |
./versionCommit.sh $BUMP_TYPE | |
cd .. | |
new_version=$(./scripts/getCurrentVersion.sh) | |
echo "version=$new_version" >> $GITHUB_OUTPUT | |
trigger-release: | |
needs: [tag-release] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: peter-evans/repository-dispatch@v2 | |
with: | |
repository: budibase/budibase-deploys | |
event-type: release-prod | |
token: ${{ secrets.GH_ACCESS_TOKEN }} | |
client-payload: |- | |
{ | |
"TAG": "${{ needs.tag-release.outputs.version }}" | |
} |