Skip to content

Commit

Permalink
fix: fix release (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Dec 31, 2023
1 parent 3a88556 commit 35a2f59
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/_semantic_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Semantic release

on:
push:
branches:
- main

jobs:
semantic-release:
name: Semantic release
uses: ./.github/workflows/release.yml

tag:
name: Update major tag
needs: semantic-release
runs-on: ubuntu-latest
if: needs.semantic-release.outputs.new_release_published == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set tag
id: tag
run: |
tag=$(echo "${{ needs.semantic-release.outputs.new_release_tag }}" | cut -d'.' -f1)
echo "name=$tag" >> $GITHUB_OUTPUT
- name: Update Tag
uses: richardsimko/update-tag@v1
with:
tag_name: ${{ steps.tag.outputs.name }}
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
name: Semantic release

on:
push:
branches:
- main
- next
- next-major
- beta
- alpha

workflow_call:
inputs:
extra_plugins:
Expand All @@ -27,7 +19,6 @@ on:
default: '20'
secrets:
GH_TOKEN_RELEASE:
required: true
outputs:
new_release_published:
description: Whether a new release has been published
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"tagFormat": "${version}",
"branches": [
"main",
"+([0-9])?(.{+([0-9]),x}).x",
"next",
"next-major",
{"name": "beta", "prerelease": true},
Expand Down

0 comments on commit 35a2f59

Please sign in to comment.