-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (41 loc) · 1 KB
/
bump.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
### Bump version
### Docs available at https://github.com/anothrNick/github-tag-action
name: Bump version
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: create pre release
if: |
github.event_name == 'pull_request'
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
PRERELEASE: true
DEFAULT_BUMP: patch
- name: Bump version and push tag
if: |
github.ref == 'refs/heads/main'
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
PRERELEASE: false
- name: Release
if: steps.tag.outputs.tag
uses: softprops/action-gh-release@v1
with:
tag_name: "${{ steps.tag.outputs.tag }}"