Skip to content

Merge pull request #122 from RA341/main #87

Merge pull request #122 from RA341/main

Merge pull request #122 from RA341/main #87

Workflow file for this run

name: Release Tag
on:
push:
branches:
- release
- beta
paths:
- brie/**
- core/**
- release-build.yml
- .github/workflows/action-*
- .github/workflows/release.yml
- Dockerfile
- .dockerignore
permissions:
contents: write
issues: write
pull-requests: write
jobs:
tag-release:
name: Create Release Tag
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.get_tag.outputs.tag }}
major_version: ${{ steps.major_version.outputs.major }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install semantic-release plugins
run: |
npm install --no-save \
@semantic-release/git \
@semantic-release/changelog -D
- name: Generate Release Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
- name: Get Release Tag
id: get_tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Trigger CircleCI Pipeline
env:
CIRCLECI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
if: ${{ steps.get_tag.outputs.tag != '' }}
run: |
VERSION_TAG="${{ steps.get_tag.outputs.tag }}"
SOURCE_BRANCH="${{ github.ref_name }}"
if [ "$SOURCE_BRANCH" = "release" ]; then
IS_LATEST="true"
else
IS_LATEST="false"
fi
echo "Triggering CircleCI pipeline with:"
echo " Version: $VERSION_TAG"
echo " Branch: $SOURCE_BRANCH"
echo " Is Latest: $IS_LATEST"
# Trigger CircleCI pipeline
curl -X POST https://circleci.com/api/v2/project/gh/${{ github.repository }}/pipeline \
-H "Circle-Token: $CIRCLECI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"version_tag": "'"$VERSION_TAG"'",
"is_latest": '"$IS_LATEST"',
"source_branch": "'"$SOURCE_BRANCH"'"
}
}'