diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72b9abbb..8241b38d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -201,7 +201,6 @@ jobs: uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 with: body_path: RELEASE.md - tag_name: ${{ env.RELEASE_VER }} name: ${{ env.RELEASE_VER }} prerelease: ${{ env.PRE_RELEASE }} draft: false diff --git a/.github/workflows/tag-on-merge.yml b/.github/workflows/tag-on-merge.yml new file mode 100644 index 00000000..884453a4 --- /dev/null +++ b/.github/workflows/tag-on-merge.yml @@ -0,0 +1,36 @@ +--- +name: Tag release after merge to master + +on: + push: + branches: + - master + +jobs: + tag_release: + name: Tag new release + runs-on: ubuntu-latest + if: startsWith(github.event.head_commit.message, 'Merge pull request') && contains(github.event.head_commit.message, 'release/v') + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Git + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + + - name: Extract version from commit message + run: | + RELEASE_VER="$(./scripts/version.sh)" && echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV + + - name: Create and push Git tag + run: | + if git rev-parse "refs/tags/v$RELEASE_VER" >/dev/null 2>&1; then + echo "Tag v$RELEASE_VER already exists. Skipping." + else + git tag "v$RELEASE_VER" + git push origin "v$RELEASE_VER" + fi diff --git a/types/constants.go b/types/constants.go index 2d2e3763..83229fef 100644 --- a/types/constants.go +++ b/types/constants.go @@ -3,6 +3,6 @@ const ( // we set page iteration limit for safety PageIterationLimit = 512 - SekaiVersion = "v0.4.10" + SekaiVersion = "v0.4.11" CosmosVersion = "v0.47.6" )