Skip to content

clean gha

clean gha #31

name: Bump Version on Merged
on:
pull_request:
types: [closed]
jobs:
tag:
if: ${{ contains(github.event.pull_request.labels.*.name, 'bump-version') }}
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: holepunchto/actions/.github/steps/setup-repo@v1
- name: Tag
run: |
version=${{ github.event.pull_request.title }}
echo "Tag $version"
git tag $version -f
git push origin $version -f
pre-build:
needs: tag
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.prepare-channel.outputs.channel }}
steps:
- name: Prepare channel
id: prepare-channel
run: |
channel-staging=${{ contains(github.event.pull_request.labels.*.name, 'channel-staging') && 'true' }}
channel-rc=${{ contains(github.event.pull_request.labels.*.name, 'channel-rc') && 'true' }}
channel=dev
if [[ "$channel-staging" == 'true' ]]; then
channel=stage
elif [[ "$channel-rc" == 'true' ]]; then
channel=rc
fi
echo "Channel to build: $channel"
echo channel=$channel >> $GITHUB_OUTPUT
build:
needs: pre-build
uses: ./.github/workflows/build.yml
secrets: inherit
with:
channel: ${{ needs.pre-build.outputs.channel }}