-
-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (56 loc) · 1.5 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
name: release
on:
push:
branches:
- main
pull_request:
types:
- labeled
jobs:
release:
if: ${{ github.event.action != 'labeled' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
uses: ./.github/action-bumpr
with:
dry_run: true
# build the Docker Image
- name:
if: "${{ !steps.bumpr.outputs.skip }}"
run: |
./.github/build.sh
env:
GITHUB_TOKEN: ${{ github.token }}
INPUT_TAG: ${{ steps.bumpr.outputs.next_version }}
# Create release.
- uses: shogo82148/actions-create-release@v1
if: "${{ !steps.bumpr.outputs.skip }}"
with:
tag_name: ${{ steps.bumpr.outputs.next_version }}
release_name: Release ${{ steps.bumpr.outputs.next_version }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
release-check:
if: "${{ github.event.action == 'labeled' }}"
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Post bumpr status comment
uses: ./.github/action-bumpr