Skip to content

Commit f74ad11

Browse files
authored
Merge pull request #2 from binary-Bug/VersionFeature
Version feature
2 parents d5a861b + 3cf6ecc commit f74ad11

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Update Release
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
9+
jobs: # This job updates the release version
10+
UpdateRelease:
11+
name: Update Release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Get next version
18+
id: get_next_version
19+
uses: hugcabbage/next-version@main
20+
with:
21+
prefix: 'v'
22+
mode: 3
23+
- name: Show the next version
24+
run: |
25+
echo ${{ steps.get_next_version.outputs.version }}
26+
- name: Create Release for master
27+
if: github.ref == 'refs/heads/master'
28+
uses: maxkomarychev/[email protected]
29+
with:
30+
token: ${{secrets.GITHUB_TOKEN}}
31+
tag_name: ${{ steps.get_next_version.outputs.version }}
32+
target_commitish: ${{github.ref}}
33+
name: "${{github.ref}} ${{ steps.get_next_version.outputs.version }}"
34+
body: "This Release was created through github actions"
35+
prerelease: false
36+
- name: Create Release for ${{github.ref}}
37+
if: github.ref != 'refs/heads/master'
38+
uses: maxkomarychev/[email protected]
39+
with:
40+
token: ${{secrets.GITHUB_TOKEN}}
41+
tag_name: ${{ steps.get_next_version.outputs.version }}
42+
target_commitish: ${{github.ref}}
43+
name: "${{github.ref}} ${{ steps.get_next_version.outputs.version }}"
44+
body: "This Release was created through github actions"
45+
prerelease: true

0 commit comments

Comments
 (0)