-
Notifications
You must be signed in to change notification settings - Fork 90
45 lines (45 loc) · 1.25 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
name: Cut a release
on:
workflow_dispatch:
inputs:
versionLevel:
description: 'The semVer level of the version'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
baseBranch:
description: 'Branch to release from'
required: true
type: choice
default: 'main'
options:
- main
- release-0.64
- release-0.52
- release-0.47
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out code from ${{ github.event.inputs.baseBranch }}
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.baseBranch }}
fetch-depth: 0
- name: Retrieve last tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: Bump version with level ${{ github.event.inputs.baseBranch }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: ${{ github.event.inputs.versionLevel }}
- name: Push the new version
uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}