Skip to content

feat(new-module): add a basic logic and structure for the first modul… #1

feat(new-module): add a basic logic and structure for the first modul…

feat(new-module): add a basic logic and structure for the first modul… #1

name: Semantic Release
on:
push:
branches:
- main
- dev/*
- feature/*
- hotfix/*
jobs:
semantic-release:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: Semantic Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Prepare prerelease semantic
if: github.ref != 'refs/heads/main'
run: mv .releaserc.prerelease.yaml .releaserc.yaml
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
id: semantic # Need an `id` for output variables
with:
semantic_version: 17
extra_plugins: |
@semantic-release/changelog@5
@semantic-release/exec@5
@semantic-release/git@9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}