-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 853 Bytes
/
version.yml
File metadata and controls
36 lines (30 loc) · 853 Bytes
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
name: Update VERSION from tag
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: main
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Update VERSION file
env:
VERSION: ${{ steps.version.outputs.version }}
run: echo "$VERSION" > VERSION
- name: Commit and push
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add VERSION
git commit -m "chore: bump VERSION to ${VERSION}"
git push