semantic versioning using action semantic-release-action in github thorws error

I have this setup, in GitHub.
Main –> Release –> Feature/*

so, developer will develop features in feature branch using semantic versioning action cycjimmy/semantic-release-action@v4 which will create a package using -next.1 before introducing this way of working we always use Release as a Pre-Prd tag and test in UAT environment with Tag X.X.X. So, now if I introduce feature way of working, Github action is complaining tag 1.0.0 already exists while it should create a tag vX.X.X-next.1 .

So does anybody knows how to fix this? I’m committing the feature change as feat
.releaserc file:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{
"branches": [
{
"name": "main"
},
{
"name": "release",
"channel": "release",
"prerelease": "release"
},
{
"name": "feature/*",
"prerelease": "next",
"channel": "next"
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
]
}
],
"@semantic-release/github"
]
</code>
<code>{ "branches": [ { "name": "main" }, { "name": "release", "channel": "release", "prerelease": "release" }, { "name": "feature/*", "prerelease": "next", "channel": "next" } ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", [ "@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" } ], [ "@semantic-release/git", { "assets": [ "CHANGELOG.md" ] } ], "@semantic-release/github" ] </code>
{
"branches": [
   { 
        "name": "main"
    },
    {
        "name": "release",
        "channel": "release",
        "prerelease": "release"
    },
    {
        "name": "feature/*",
        "prerelease": "next",
        "channel": "next"
    }
],
"plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
        "@semantic-release/changelog",
        {
            "changelogFile": "CHANGELOG.md"
        }
    ],
    [
        "@semantic-release/git",
        {
            "assets": [
                "CHANGELOG.md"
            ]
        }
    ],
    "@semantic-release/github"

]

}

and my workflow file build.yaml looks like this

name: Build Pre-release CI

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>on:
push:
branches:
- feature/test
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Run Semantic Release for Feature
id: semantic_release_feature
uses: cycjimmy/semantic-release-action@v4
with:
branch: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Extract release version from tag
id: get_version
run: |
RELEASE_VERSION=${{ steps.semantic_release_feature.outputs.new_release_version }}
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- name: Run Python tests
run: |
python -m unittest discover
- name: Update setup.py version
run: |
sed -i "s/version='.*'/version='${{ env.RELEASE_VERSION }}'/" setup.py
cat setup.py
- name: Commit version update
run: |
git config --global user.email "[email protected]"
git config --global user.name "ci-bot"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git add setup.py
git commit -m "chore(release): bump version to ${{ env.RELEASE_VERSION }}"
git push origin ${{ github.ref_name }}
</code>
<code>on: push: branches: - feature/test jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: persist-credentials: true - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.9' - name: Run Semantic Release for Feature id: semantic_release_feature uses: cycjimmy/semantic-release-action@v4 with: branch: ${{ github.ref_name }} env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - name: Extract release version from tag id: get_version run: | RELEASE_VERSION=${{ steps.semantic_release_feature.outputs.new_release_version }} echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV - name: Run Python tests run: | python -m unittest discover - name: Update setup.py version run: | sed -i "s/version='.*'/version='${{ env.RELEASE_VERSION }}'/" setup.py cat setup.py - name: Commit version update run: | git config --global user.email "[email protected]" git config --global user.name "ci-bot" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git add setup.py git commit -m "chore(release): bump version to ${{ env.RELEASE_VERSION }}" git push origin ${{ github.ref_name }} </code>
on:
  push:
    branches:
      - feature/test

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          persist-credentials: true

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.9'

      - name: Run Semantic Release for Feature 
        id: semantic_release_feature
        uses: cycjimmy/semantic-release-action@v4
        with:
          branch: ${{ github.ref_name }}
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

      - name: Extract release version from tag
        id: get_version
        run: |
          RELEASE_VERSION=${{ steps.semantic_release_feature.outputs.new_release_version }}
          echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV

      - name: Run Python tests
        run: |
          python -m unittest discover

      - name: Update setup.py version
        run: |
          sed -i "s/version='.*'/version='${{ env.RELEASE_VERSION }}'/" setup.py
          cat setup.py

      - name: Commit version update
        run: |
          git config --global user.email "[email protected]"
          git config --global user.name "ci-bot"
          git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
          git add setup.py
          git commit -m "chore(release): bump version to ${{ env.RELEASE_VERSION }}"
          git push origin ${{ github.ref_name }}
   

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật