From 6af05f5edd47dcdbae25f1dd29a43adbcc8b59b2 Mon Sep 17 00:00:00 2001 From: Rittik Dasgupta Date: Thu, 24 Oct 2024 13:56:12 +0530 Subject: [PATCH] github: add major version tagging workflow and release notes generator --- .github/release.yaml | 25 +++++++++++++++ .../workflows/update-major-version-tag.yaml | 31 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/release.yaml create mode 100644 .github/workflows/update-major-version-tag.yaml diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..a5f9aa3 --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,25 @@ +# .github/release.yml + +changelog: + exclude: + labels: + - ignore-for-release + authors: + - octocat + categories: + - title: ✨ New Features & Enhancements + labels: + - feature + - enhancement + - title: 🛠 Breaking Changes + labels: + - breaking-change + - title: 🐞 Bug Fixes + labels: + - bug + - title: 🔖 Documentation + labels: + - documentation + - title: 🪛 Other Changes + labels: + - "*" \ No newline at end of file diff --git a/.github/workflows/update-major-version-tag.yaml b/.github/workflows/update-major-version-tag.yaml new file mode 100644 index 0000000..1001a4f --- /dev/null +++ b/.github/workflows/update-major-version-tag.yaml @@ -0,0 +1,31 @@ +name: Update Major Version Tag +run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }} + +on: + workflow_dispatch: + inputs: + target: + description: The tag or reference to use + required: true + major_version: + type: choice + description: The major version to update + options: + - v1 + +jobs: + tag: + runs-on: ubuntu-latest + steps: + # Note this update workflow can also be used as a rollback a major version tag + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Git config + run: | + git config --global user.name 'GitHub Actions' + git config --global user.email 'actions@github.com' + - name: Tag new target + run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }} + - name: Push new tag + run: git push origin ${{ github.event.inputs.major_version }} --force