forked from sickmartian/quick_simplenote
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 2.08 KB
/
release.yaml
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
name: Create Release and Tag on Merge
on:
# push:
pull_request:
types: [closed]
jobs:
release:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
tag_prefix: "st4-"
default_bump: "patch"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check release output
run: |
echo tag_version.output.new_tag: "${{ steps.tag_version.outputs.new_tag }}"
echo tag_version.output.new_version: "${{ steps.tag_version.outputs.new_version }}"
echo tag_version.output.previous_tag: "${{ steps.tag_version.outputs.previous_tag }}"
echo tag_version.output.previous_version: "${{ steps.tag_version.outputs.previous_version }}"
echo tag_version.output.release_type: "${{ steps.tag_version.outputs.release_type }}"
echo tag_version.output.changelog: "${{ steps.tag_version.outputs.changelog }}"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
# - name: Set up Git
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# - uses: paulhatch/[email protected]
# id: generate-version
# with:
# tag_prefix: "st4-"
# major_pattern: "(MAJOR)"
# minor_pattern: "(MINOR)"
# version_format: "st4-${major}.${minor}.${patch}"
# - name: Create Release
# id: create-release
# uses: undergroundwires/[email protected]
# with:
# git-token: ${{ secrets.ACTION_TOKEN }}
# release-token: ${{ secrets.ACTION_TOKEN }}