Skip to content

Commit b0ef75f

Browse files
committed
ci: test new tag action workflow
1 parent 5a9a293 commit b0ef75f

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/workflows/tag-action.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1+
# example 2: on merge to master from pull request (recommended)
12
name: Bump version
23
on:
34
push:
45
branches:
56
- main
7+
# name: Bump version
8+
# on:
9+
# pull_request:
10+
# types:
11+
# - closed
12+
# branches:
13+
# - main
14+
615
jobs:
716
build:
8-
runs-on: ubuntu-latest
17+
if: github.event.pull_request.merged == true
18+
runs-on: ubuntu-22.04
19+
permissions:
20+
contents: write
921
steps:
10-
- uses: actions/checkout@master
11-
- name: Bump version and push tag
12-
uses: hennejg/github-tag-action@master
13-
with:
14-
github_token: ${{ secrets.GITHUB_TOKEN }}
15-
release_branches: main
22+
- uses: actions/checkout@v4
23+
with:
24+
ref: ${{ github.event.pull_request.merge_commit_sha }}
25+
fetch-depth: '0'
26+
27+
- name: Bump version and push tag
28+
uses: anothrNick/github-tag-action@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
TAG_PREFIX: v
32+
PRERELEASE: true

0 commit comments

Comments
 (0)