Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: auto tagging after release pr is merged #3135

Merged
merged 17 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ jobs:
branch: "release-${{ env.NEWVERSION }}"
base: "${{ env.TARGET_BRANCH }}"
signoff: true
labels: |
release-pr
${{ github.event.inputs.release_version }}
29 changes: 29 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: create_tag
on:
pull_request:
types: [closed]

permissions:
contents: write

jobs:
create_tag:
name: "Create tag"
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release-pr') && contains(github.event.pull_request.title, format('chore{0} Prepare', ':'))
JaydipGabani marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-22.04
steps:
- name: "Set release tag"
env:
GITHUB_CONTEXT: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
RELEASE_TAG=$(echo "$GITHUB_CONTEXT" | jq '.[1]' | tr -d '"')
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV

- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2

- uses: rickstaa/action-create-tag@v1.6.4
JaydipGabani marked this conversation as resolved.
Show resolved Hide resolved
id: "tag_create"
JaydipGabani marked this conversation as resolved.
Show resolved Hide resolved
with:
tag: ${{ env.RELEASE_TAG }}
tag_exists_error: false
Loading