-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (59 loc) · 1.84 KB
/
update-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Update Version Number
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
type: string
default: 'develop'
milestone:
description: 'Milestone to use as version'
type: string
required: true
workflow_call:
inputs:
branch:
description: 'Branch to use'
type: string
default: 'develop'
milestone:
description: 'Milestone to use as version'
type: string
required: true
jobs:
update_version:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
repository: assimbly/custom-components
ref: ${{ inputs.branch }}
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Update POM Version
run: |
echo "Updating to version: ${{ inputs.milestone }}"
mvn versions:set -DnewVersion=${{ inputs.milestone }}
mvn versions:set-property -Dproperty=assimbly.version -DnewVersion=${{ inputs.milestone }}
- name: Diff check
run: git diff
- name: Commit files
run: |
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
git config --global core.compression 0
git config --local user.email "[email protected]"
git config --local user.name "skin27"
git diff-index --quiet HEAD || git commit -a -m "Update version to ${{inputs.milestone}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.RELEASE_TOKEN }}
repository: assimbly/custom-components
ref: ${{ inputs.branch }}
force_with_lease: true