-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (31 loc) · 1.07 KB
/
version.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
# https://github.com/marketplace/actions/github-tag-bump
name: Bump version
on: push
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: "patch"
RELEASE_BRANCHES: "master,main,dev"
- name: Update version file
if: steps.tag.outputs.new_tag != ''
run: sed -i 's/VERSION = "[^"]*"/VERSION = "${{ steps.tag.outputs.new_tag }}"/' sfs.lua
- name: Commit version file
if: steps.tag.outputs.new_tag != ''
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add sfs.lua
git commit -m "Update version file to ${{ steps.tag.outputs.new_tag }}"
git push origin HEAD:master