-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (31 loc) · 972 Bytes
/
bumpversion.yml
File metadata and controls
34 lines (31 loc) · 972 Bytes
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
name: Bump Version
on:
workflow_dispatch:
inputs:
bumpPart:
description: 'Bump part (major, minor or patch)'
required: true
default: "minor"
# Add permission to push to repo
permissions:
contents: write
jobs:
bump:
name: Bump App Version
runs-on: ubuntu-latest
# Sanity check on the input
if: contains(['major', 'minor', 'patch'], ${{ github.event.inputs.bumpPart }})
steps:
- uses: actions/checkout@v4
- name: Bump version
id: bumpversion
uses: jasonamyers/github-bumpversion-action@v1.0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: ${{ github.event.inputs.bumpPart }}
- name: Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "$remote_repo" HEAD:"${GITHUB_REF#refs/heads/}"