Merge pull request #1149 from nuritizra/sonarqube_example_app #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release all workspaces | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
find-changed-workspaces: | |
name: Detect workspace changes | |
runs-on: ubuntu-latest | |
outputs: | |
workspaces: ${{ steps.find-changed-workspaces.outputs.workspaces }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4 | |
- name: Set up Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ # Needed for auth | |
- name: Fetch previous commit for check | |
run: git fetch origin '${{ github.event.before }}' | |
- name: Find changed workspaces | |
id: find-changed-workspaces | |
run: node ./scripts/ci/list-workspaces-with-changes.js | |
env: | |
COMMIT_SHA_BEFORE: "${{ github.event.before }}" | |
maybe-release-workspace: | |
name: Maybe release ${{ matrix.workspace }} | |
needs: find-changed-workspaces | |
if: ${{ needs.find-changed-workspaces.outputs.workspaces != '[]' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
workspace: ${{ fromJSON(needs.find-changed-workspaces.outputs.workspaces) }} | |
uses: ./.github/workflows/release_workspace.yml | |
with: | |
workspace: ${{ matrix.workspace }} | |
secrets: inherit |