Skip to content

Commit d04ea3e

Browse files
Merge pull request #6 from im-open/update-increment
ARCH-1805 - Update increment workflow to produce multiple tags
2 parents 3d4cbf4 + 97b353f commit d04ea3e

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/increment-version-on-merge.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,22 @@ jobs:
3838
with:
3939
ref: main
4040
fetch-depth: 0
41-
persist-credentials: false
4241

4342
# See https://github.com/im-open/git-version-lite for more details around how to increment
4443
# major/minor/patch through commit messages
4544
- name: Increment the version
46-
uses: im-open/git-version-lite@v2.1.1
45+
uses: im-open/git-version-lite@v2
46+
id: version
4747
with:
48-
create-ref: true
4948
github-token: ${{ secrets.GITHUB_TOKEN }}
50-
default-release-type: major
51-
tag-prefix: none
49+
50+
- name: Create version tag, create or update major, and minor tags
51+
run: |
52+
git config user.name github-actions
53+
git config user.email github-actions@github.com
54+
git tag ${{ steps.version.outputs.NEXT_VERSION }} ${{ github.sha }}
55+
git tag -f ${{ steps.version.outputs.NEXT_MAJOR_VERSION }} ${{ github.sha }}
56+
git tag -f ${{ steps.version.outputs.NEXT_MINOR_VERSION }} ${{ github.sha }}
57+
git push origin ${{ steps.version.outputs.NEXT_VERSION }}
58+
git push origin ${{ steps.version.outputs.NEXT_MAJOR_VERSION }} -f
59+
git push origin ${{ steps.version.outputs.NEXT_MINOR_VERSION }} -f

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ This action does not generate the code coverage reports itself, those must be cr
4747
run: dotnet test ${{ env.SOLUTION }} --no-restore --logger trx --configuration Release /property:CollectCoverage=True /property:CoverletOutputFormat=opencover
4848

4949
- name: ReportGenerator
50-
uses: im-open/code-coverage-report-generator@4.9.0
50+
# You may also reference the major or major.minor version
51+
uses: im-open/code-coverage-report-generator@4.9.2
5152
with:
5253
reports: '*/**/coverage.opencover.xml'
5354
targetdir: ${{ env.CODE_COVERAGE_DIR }}'
@@ -71,7 +72,7 @@ This action does not generate the code coverage reports itself, those must be cr
7172
path: ${{ env.CODE_COVERAGE_DIR }}
7273

7374
- name: Create a PR comment from the summary file
74-
uses: im-open/process-code-coverage-summary@v2.2.0
75+
uses: im-open/process-code-coverage-summary@v2
7576
with:
7677
github-token: ${{ secrets.GITHUB_TOKEN }}
7778
summary-file: '${{ env.CODE_COVERAGE_DIR }}/Summary.md'

0 commit comments

Comments
 (0)