-
Notifications
You must be signed in to change notification settings - Fork 72
36 lines (30 loc) · 959 Bytes
/
bump-version.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
# This workflow is manually triggered.
name: Bump version
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (x.x.x)'
required: true
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Setup Git
run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
- name: Bump version
run: |
VERSION=${{ github.event.inputs.version }}
hack/update-version.sh "${VERSION}"
git add cmd/gmailctl/cmd/version.go
git commit -m "Bump version to ${VERSION}"
git tag -a "v${VERSION}" -m "Release version ${VERSION}."
hack/update-version.sh "${VERSION}-dev"
git add cmd/gmailctl/cmd/version.go
git commit -m "Bump version to ${VERSION}-dev"
- name: Push latest version
run: git push origin master --follow-tags