Skip to content

Commit

Permalink
fix: improvements in semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Jul 18, 2024
1 parent a204d25 commit 054ceba
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
outputs:
release_type: ${{ steps.get_release_type.outputs.release_type }}
tag_name: ${{ steps.get_tag_name.outputs.tag_name }}
branch_name: ${{ steps.get_branch_name.outputs.branch_name }}
steps:
- name: Setup Node.js
uses: actions/setup-node@v2
Expand Down Expand Up @@ -61,10 +62,16 @@ jobs:
fi
shell: bash

- name: Capture Branch Name
id: get_branch_name
run: echo "branch_name=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
shell: bash

call-reusable:
needs: release
if: needs.release.outputs.release_type != 'none'
uses: gisce/react-ooui/.github/workflows/reusable_workflow.yaml@alpha
uses: gisce/react-ooui/.github/workflows/update_dependent_projects.yaml@alpha
with:
release_type: ${{ needs.release.outputs.release_type }}
tag_name: ${{ needs.release.outputs.tag_name }}
tag_name: ${{ needs.release.outputs.tag_name }}
branch_name: ${{ needs.release.outputs.branch_name }}
53 changes: 53 additions & 0 deletions .github/workflows/update_dependent_projects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update dependent projects

env:
LIBRARY_NAME: "gisce/react-ooui"

on:
workflow_call:
inputs:
release_type:
description: 'The type of release (patch, minor, major)'
required: true
type: string
tag_name:
description: 'The tag name of the release'
required: true
type: string
branch_name:
description: 'The name of the branch'
required: true
type: string
workflow_dispatch:
inputs:
release_type:
description: 'The type of release (patch, minor, major)'
required: true
type: string
tag_name:
description: 'The tag name of the release'
required: true
type: string
branch_name:
description: 'The name of the branch'
required: true
type: string

jobs:
update-dependents:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project: "gisce/webclient"
# modify this in case that branches are not equivalent and exists between projects
branch: ${{ inputs.branch_name }}
steps:
- name: Call Reusable Workflow for each project
uses: gisce/create-update-version-pr@v0.0.7
with:
dependentProject: ${{ matrix.project }}
tagName: ${{ inputs.tag_name }}
dependentProjectBranch: ${{ matrix.branch }}
libraryName: ${{ env.LIBRARY_NAME }}
githubToken: ${{ secrets.GH_PAT }}

0 comments on commit 054ceba

Please sign in to comment.