Skip to content

refactor: Remove BLS12381 G2 Add and Double functionalities #62

refactor: Remove BLS12381 G2 Add and Double functionalities

refactor: Remove BLS12381 G2 Add and Double functionalities #62

Workflow file for this run

name: Tag release
on:
pull_request:
types: [ closed ]
branches:
- dev
- release/*
jobs:
# Creates a new tag if a release branch is merged
tag-bump:
if: |
github.event.pull_request.merged == true &&
((startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.base.ref == 'dev') ||
(startsWith(github.event.pull_request.head.ref, 'hotfix/') && startsWith(github.event.pull_request.base.ref, 'release/')))
runs-on: ubuntu-latest
steps:
- name: Git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global url."https://${{ secrets.REPO_TOKEN }}@github.com/".insteadOf ssh://[email protected]
git config --global url."https://${{ secrets.REPO_TOKEN }}@github.com".insteadOf https://github.com
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version
id: get-version
run: |
VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | cut -d'/' -f 2)
RELEASE_BRANCH="${{ startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.head.ref || github.event.pull_request.base.ref }}"
if [[ "${{ startsWith(github.event.pull_request.head.ref, 'release/') }}" == "true" ]]; then
VERSION="${VERSION}.0"
fi
git tag -a $VERSION -m "$VERSION" origin/$RELEASE_BRANCH
git push origin $VERSION --follow-tags
echo "version=$VERSION" | tee -a "$GITHUB_OUTPUT"
echo "RELEASE_BRANCH=$RELEASE_BRANCH" | tee -a "$GITHUB_ENV"
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
with:
toTag: ${{ steps.get-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.github_release.outputs.changelog }}
tag: ${{ steps.get-version.outputs.version }}
commit: ${{ env.RELEASE_BRANCH }}
allowUpdates: true