-
Notifications
You must be signed in to change notification settings - Fork 36
51 lines (44 loc) · 1.2 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Update Version"
on:
#push:
# tags:
# - v*
#branches: ["main"]
#pull_request:
# The branches below must be a subset of the branches above
#branches: ["main"]
#workflow_dispatch:
jobs:
versioning:
name: Versioning
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup .net core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x"
- name: install gitversion
uses: gittools/actions/gitversion/setup@v0
with:
versionspec: "5.x"
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0
- name: Create version file
run: |
echo "Version: ${{ steps.gitversion.outputs.majorMinorPatch }}" > version.txt
- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add version.txt
git commit -m "Update version"
git push