diff --git a/.github/workflows/increment-version-on-merge.yml b/.github/workflows/increment-version-on-merge.yml index 3ab5abb..11043a4 100644 --- a/.github/workflows/increment-version-on-merge.yml +++ b/.github/workflows/increment-version-on-merge.yml @@ -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 diff --git a/README.md b/README.md index ffda59b..401abb2 100644 --- a/README.md +++ b/README.md @@ -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 }} @@ -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 \ No newline at end of file +[git-version-lite]: https://github.com/im-open/git-version-lite diff --git a/action.yml b/action.yml index 2e120e8..ab544e9 100644 --- a/action.yml +++ b/action.yml @@ -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: