-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove + recreate major and minor versions (#52)
- Loading branch information
1 parent
7a013ba
commit f13f541
Showing
2 changed files
with
39 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
# | ||
# See https://github.com/PaulHatch/semantic-version https://github.com/PaulHatch/semantic-version/tree/v5.0.2 | ||
# See https://github.com/softprops/action-gh-release https://github.com/softprops/action-gh-release/tree/v1 | ||
# See https://github.com/Actions-R-Us/actions-tagger https://github.com/Actions-R-Us/actions-tagger/releases/tag/v2.0.3 | ||
|
||
name: 'Auto release' | ||
on: | ||
|
@@ -21,6 +20,8 @@ jobs: | |
with: | ||
fetch-depth: 0 # Force fetch all commits - See https://github.com/PaulHatch/semantic-version#important-note-regarding-the-checkout-action | ||
|
||
- run: "echo \"GITHUB_SHA: ${{ github.sha }}\"" | ||
|
||
# Outputs documentation: https://github.com/PaulHatch/semantic-version/blob/master/src/main.ts#L22-L33 | ||
- name: Resolving next Release Candidate version using semantic-version | ||
uses: paulhatch/[email protected] | ||
|
@@ -56,7 +57,7 @@ jobs: | |
--title "${{steps.next_semantic_version.outputs.version_tag}}" \ | ||
--latest \ | ||
--generate-notes \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -76,17 +77,21 @@ jobs: | |
gh release create v${{steps.next_semantic_version.outputs.major}} \ | ||
--title "v${{steps.next_semantic_version.outputs.major}} MAJOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
# See https://cli.github.com/manual/gh_release_edit | ||
- name: Updating existing release for the major "v${{steps.next_semantic_version.outputs.major}}" version | ||
- name: Recreating existing release for the major "v${{steps.next_semantic_version.outputs.major}}" version | ||
if: ${{ steps.majorTagExists.outputs.exists == 'true' }} | ||
run: | | ||
gh release edit v${{steps.next_semantic_version.outputs.major}} \ | ||
# Delete and create the release again | ||
gh release delete v${{steps.next_semantic_version.outputs.major}} --cleanup-tag --yes | ||
gh release create v${{steps.next_semantic_version.outputs.major}} \ | ||
--title "v${{steps.next_semantic_version.outputs.major}} MAJOR release (auto-updated)" \ | ||
--target $GITHUB_SHA | ||
--generate-notes \ | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -106,16 +111,20 @@ jobs: | |
gh release create v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} \ | ||
--title "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} MINOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
# See https://cli.github.com/manual/gh_release_edit | ||
- name: Updating existing release for the minor "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}" version | ||
- name: Recreating existing release for the minor "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}" version | ||
if: ${{ steps.minorTagExists.outputs.exists == 'true' }} | ||
run: | | ||
gh release edit v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} \ | ||
# Delete and create the release again | ||
gh release delete v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} --cleanup-tag --yes | ||
gh release create v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} \ | ||
--title "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}} MINOR release (auto-updated)" \ | ||
--target $GITHUB_SHA | ||
--generate-notes \ | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,13 @@ jobs: | |
tag-and-release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Fetching all commits for the current branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Force fetch all commits - See https://github.com/PaulHatch/semantic-version#important-note-regarding-the-checkout-action | ||
|
||
- run: "echo \"GITHUB_SHA: ${{ github.sha }}\"" | ||
|
||
# Outputs documentation: https://github.com/PaulHatch/semantic-version/blob/master/src/main.ts#L22-L33 | ||
- name: Resolving next Release Candidate version using semantic-version | ||
uses: paulhatch/[email protected] | ||
|
@@ -65,18 +68,22 @@ jobs: | |
--title "v${{steps.next_semantic_version.outputs.major}}-rc MAJOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--prerelease \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
# See https://cli.github.com/manual/gh_release_edit | ||
- name: Updating existing release for the major "v${{steps.next_semantic_version.outputs.major}}-rc" version | ||
- name: Recreating existing release for the major "v${{steps.next_semantic_version.outputs.major}}-rc" version | ||
if: ${{ steps.majorTagExists.outputs.exists == 'true' }} | ||
run: | | ||
gh release edit v${{steps.next_semantic_version.outputs.major}}-rc \ | ||
# Delete and create the release again | ||
gh release delete v${{steps.next_semantic_version.outputs.major}}-rc --cleanup-tag --yes | ||
gh release create v${{steps.next_semantic_version.outputs.major}}-rc \ | ||
--title "v${{steps.next_semantic_version.outputs.major}}-rc MAJOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--prerelease \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -97,17 +104,21 @@ jobs: | |
--title "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc MINOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--prerelease \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
# See https://cli.github.com/manual/gh_release_edit | ||
- name: Updating existing release for the minor "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc" version | ||
- name: Recreating existing release for the minor "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc" version | ||
if: ${{ steps.minorTagExists.outputs.exists == 'true' }} | ||
run: | | ||
gh release edit v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc \ | ||
# Delete and create the release again | ||
gh release delete v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc --cleanup-tag --yes | ||
gh release create v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc \ | ||
--title "v${{steps.next_semantic_version.outputs.major}}.${{steps.next_semantic_version.outputs.minor}}-rc MINOR release (auto-updated)" \ | ||
--generate-notes \ | ||
--prerelease \ | ||
--target $GITHUB_SHA | ||
--target "${{github.sha}}" | ||
env: | ||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |