From b1b3448dcb541774a0b469a2c690d963a0baf69c Mon Sep 17 00:00:00 2001 From: "Harrison (Harry) Cramer" <32515581+harrisoncramer@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:10:39 -0500 Subject: [PATCH] Automatically generate releases from new tags (#114) --- .../{tags.yaml => tag-and-release.yaml} | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) rename .github/workflows/{tags.yaml => tag-and-release.yaml} (58%) diff --git a/.github/workflows/tags.yaml b/.github/workflows/tag-and-release.yaml similarity index 58% rename from .github/workflows/tags.yaml rename to .github/workflows/tag-and-release.yaml index dce3d37..0f6755c 100644 --- a/.github/workflows/tags.yaml +++ b/.github/workflows/tag-and-release.yaml @@ -1,10 +1,10 @@ -name: Tag + Bump version +name: Tag + Create Release on: push: branches: - main jobs: - build: + tag: runs-on: ubuntu-22.04 permissions: contents: write @@ -13,7 +13,8 @@ jobs: with: ref: ${{ github.event.pull_request.merge_commit_sha }} fetch-depth: '0' - - name: Bump version and push tag + - name: Create Tag 🏷️ + id: create_tag uses: anothrNick/github-tag-action@1.64.0 env: DEFAULT_BUMP: patch @@ -25,3 +26,16 @@ jobs: PATCH_STRING_TOKEN: PATCH NONE_STRING_TOKEN: NONE BRANCH_HISTORY: last + outputs: + tag: ${{ steps.create_tag.outputs.tag }} + release: + needs: [tag] + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - name: 🛎️ Create release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ needs.tag.outputs.tag }}