-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.66 KB
/
tag.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
name: Tag
on:
workflow_dispatch:
workflow_call:
inputs:
ref:
description: "The branch, tag or SHA to checkout"
default: ''
required: false
type: string
dry-run:
description: "Determine the next version without tagging the branch. The workflow can use the outputs new_tag and tag in subsequent steps. Possible values are true and false (default)"
default: false
required: false
type: string
outputs:
tag:
description: "The value of the latest tag after running this action"
value: ${{ jobs.tag-job.outputs.tag }}
new-tag:
description: "The value of the newly created tag"
value: ${{ jobs.tag-job.outputs.new-tag }}
secrets:
BROADBOT_TOKEN:
required: true
jobs:
tag-job:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
new-tag: ${{ steps.tag.outputs.new_tag }}
steps:
- name: Checkout current code
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref || '' }}
token: ${{ secrets.BROADBOT_TOKEN }} # this allows the push to succeed later
- name: Bump the tag to a new version
# https://github.com/DataBiosphere/github-actions/tree/master/actions/bumper
uses: databiosphere/github-actions/actions/bumper@bumper-0.3.0
id: tag
env:
GITHUB_TOKEN: ${{ secrets.BROADBOT_TOKEN }}
DEFAULT_BUMP: minor
RELEASE_BRANCHES: dev
VERSION_FILE_PATH: build.gradle
VERSION_LINE_MATCH: "^\\s*version\\s*=\\s*'.*'"
VERSION_SUFFIX: SNAPSHOT
DRY_RUN: ${{ inputs.dry-run || false }}