-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (44 loc) · 1.41 KB
/
bump-version-merged.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Bump Version on Merged
on:
pull_request:
types: [closed]
env:
version: ${{ github.event.pull_request.title }}
channel-dev: ${{ contains(github.event.pull_request.labels.*.name, 'channel-dev') && 'true' }}
channel-staging: ${{ contains(github.event.pull_request.labels.*.name, 'channel-staging') && 'true' }}
channel-rc: ${{ contains(github.event.pull_request.labels.*.name, 'channel-rc') && 'true' }}
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: |
echo ${{ env.version }}
git tag ${{ env.version }}
git push --tags
pre-build:
needs: tag
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.prepare-channel.outputs.channel }}
steps:
- name: Prepare channel
id: prepare-channel
run: |
channel=dev
if [[ ${{ env.channel-staging }} == 'true' ]]; then
channel=stage
elif [[ ${{ env.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 }}