forked from DomCR/ACadSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1 KB
/
auto-version.yml
File metadata and controls
36 lines (32 loc) · 1 KB
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: Auto Version
on:
pull_request:
types: [labeled]
permissions:
contents: write
env:
CURRENT_BRANCH: ${{github.event.pull_request.head.ref}}
VERSION_FORMAT: ${{ fromJSON('[ "*.^.0", "*.*.^"]')[contains(github.event.pull_request.labels.*.name, 'minor')] }}
jobs:
update:
if: contains(github.event.pull_request.labels.*.name, 'minor') || contains(github.event.pull_request.labels.*.name, 'major')
runs-on: windows-latest
name: Update version
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
ref: ${{env.CURRENT_BRANCH}}
- name: Update version
id: update
uses: vers-one/dotnet-project-version-updater@v1.7
with:
file: ./src/ACadSharp/ACadSharp.csproj
version: ${{env.VERSION_FORMAT}}
- name: Push changes
run: ./push-changes.sh
shell: bash
env:
VERSION: ${{steps.update.outputs.newVersion}}
BRANCH: ${{env.CURRENT_BRANCH}}