-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (58 loc) · 1.97 KB
/
versionbump.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Bump version
on:
push:
branches:
- master
jobs:
releaseJob:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout main branch to calculate changelog
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Calculate version
id: tag_version
uses: miguelfito/github-bump-and-tag-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
create_annotated_tag: true
tag_prefix: v
dry_run: true
# - name: Set npm package version
# uses: reedyuk/npm-version@1.0.1
# with:
# version: ${{ steps.tag_version.outputs.new_version }}
#
# - name: Commit & push version bumping on package*.json
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# branch: master
# file_pattern: package*.json
# commit_message: 'chore(release): Automated version bumping to ${{ steps.tag_version.outputs.new_tag }}'
# commit_user_name: GitHub Actions
# commit_user_email: actions@github.com
- name: Get updated commit SHA
run: |
echo "##[set-output name=commit_id;]$(git rev-parse HEAD)"
id: updated_sha
- name: Bump version and push tag
uses: miguelfito/github-bump-and-tag-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_sha: ${{ steps.updated_sha.outputs.commit_id }}
default_bump: patch
create_annotated_tag: true
tag_prefix: v
- uses: fregante/release-with-changelog@v3
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
token: ${{ secrets.GITHUB_TOKEN }}
commit-template: '- {date}: {title} ← {hash}'
template: |
### Changelog
{commits}
Compare: {range}
❤