Skip to content

Commit

Permalink
Merge pull request #7 from im-open/create-major-tag
Browse files Browse the repository at this point in the history
TW-64305: Create Major version tag on merge
  • Loading branch information
danielle-casella-adams authored Mar 13, 2023
2 parents e5182d9 + af8d69d commit 491793d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/increment-version-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,23 @@ jobs:
with:
ref: main
fetch-depth: 0
persist-credentials: false

# See https://github.com/im-open/git-version-lite for more details around how to increment
# major/minor/patch through commit messages
- name: Increment the version
uses: im-open/git-version-lite@v2.1.2
uses: im-open/git-version-lite@v2
id: version
with:
create-ref: true
github-token: ${{ secrets.GITHUB_TOKEN }}
default-release-type: major

- name: Create version tag, create or update major, and minor tags
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git tag ${{ steps.version.outputs.NEXT_VERSION }} ${{ github.sha }}
git tag -f ${{ steps.version.outputs.NEXT_MAJOR_VERSION }} ${{ github.sha }}
git tag -f ${{ steps.version.outputs.NEXT_MINOR_VERSION }} ${{ github.sha }}
git push origin ${{ steps.version.outputs.NEXT_VERSION }}
git push origin ${{ steps.version.outputs.NEXT_MAJOR_VERSION }} -f
git push origin ${{ steps.version.outputs.NEXT_MINOR_VERSION }} -f
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:

# If this action determines the release is not production ready
# it will fail and the next job, deploy, will not happen.
- uses: im-open/is-release-production-ready@v1.1.2

# You may also reference just the major or major.minor version
- uses: im-open/is-release-production-ready@v1.1.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.inputs.release-tag }}
Expand Down Expand Up @@ -107,4 +109,4 @@ This project has adopted the [im-open's Code of Conduct](https://github.com/im-o

Copyright © 2021, Extend Health, LLC. Code released under the [MIT license](LICENSE).

[git-version-lite]: https://github.com/im-open/git-version-lite
[git-version-lite]: https://github.com/im-open/git-version-lite
5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: 'is-release-production-ready'

description: 'An action that retrieves a release by tag and determines if it is a Published release, not a draft or prerelease.'
name: is-release-production-ready
description: An action that retrieves a release by tag and determines if it is a Published release, not a draft or prerelease.

inputs:
token:
Expand Down

0 comments on commit 491793d

Please sign in to comment.