From b4afbbdb20b3add26bad887176e36aae191abad4 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Sun, 18 Feb 2024 12:33:39 +0100 Subject: [PATCH] chore: support major and minor tags (#427) --- .github/workflows/ci.yml | 15 +++++++++++++++ README.md | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0117c7..d44aaa4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,3 +84,18 @@ jobs: release-type: simple next-version: v2.0.0 last-release-sha: b62a69e27ae389aa92b450f647d37409b9277bf0 + + - name: tag major and minor versions + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name semantic-releaser[bot] + git config user.email 102556+semantic-releaser[bot]@users.noreply.github.com + git remote add gh-token "https://${{ steps.app-token.outputs.token }}@github.com/npalm/action-docs-action.git" + git tag -d v${{ steps.release.outputs.major }} || true + git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git push origin :v${{ steps.release.outputs.major }} || true + git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" + git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" + git push origin v${{ steps.release.outputs.major }} + git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} diff --git a/README.md b/README.md index ee1a4dc..1a40a96 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The action will update you readme by replacing html comment tags. Add one of mor - `description` : to add/update a section with a descriptions of the action - `inputs`: to add/update a section with inputs of the action - `outputs`: to add/update a section with outputs of the action -- `runs`: : to add/update a section of the environment required to run. +- `runs`: to add/update a section of the environment required to run. In your workflow add the action, see below for the available parameters.