-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da7a1b3
commit a94f218
Showing
1 changed file
with
19 additions
and
7 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 |
---|---|---|
|
@@ -103,22 +103,22 @@ jobs: | |
crate: git-cliff | ||
version: 1.4.0 | ||
|
||
- name: Install convco | ||
- name: Install cocogitto | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: convco | ||
version: 0.5.0 | ||
crate: cocogitto | ||
version: 6.1.0 | ||
|
||
- name: Obtain previous and next tag information | ||
shell: bash | ||
run: | | ||
PREVIOUS_TAG="v$(convco version --prefix 'v')" | ||
NEXT_TAG="v$(convco version --prefix 'v' "--${{ inputs.bump_type }}")" | ||
PREVIOUS_TAG="v$(cog --verbose get-version)" | ||
NEXT_TAG="$(cog --verbose bump --dry-run "--${{ inputs.bump_type }}")" | ||
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> $GITHUB_ENV | ||
echo "NEXT_TAG=${NEXT_TAG}" >> $GITHUB_ENV | ||
# We make use of GitHub API calls to create the tag to have signed tags | ||
# We make use of GitHub API calls to create and update tags | ||
- name: Create SemVer tag | ||
shell: bash | ||
env: | ||
|
@@ -133,6 +133,18 @@ jobs: | |
--raw-field "ref=refs/tags/${NEXT_TAG}" \ | ||
--raw-field 'sha=${{ github.sha }}' | ||
- name: Update `latest` tag to point to newly created SemVer tag | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ steps.generate_app_token.outputs.token }} | ||
run: | | ||
gh api \ | ||
--method PATCH \ | ||
--header 'Accept: application/vnd.github+json' \ | ||
--header 'X-GitHub-Api-Version: 2022-11-28' \ | ||
'/repos/{owner}/{repo}/git/refs/tags/latest' \ | ||
--raw-field 'sha=${{ github.sha }}' | ||
- name: Generate changelog | ||
shell: bash | ||
run: | | ||
|
@@ -151,4 +163,4 @@ jobs: | |
with: | ||
name: release-notes.md | ||
path: release-notes.md | ||
if-no-files-found: error | ||
if-no-files-found: error |