Skip to content

Merge pull request #140 from alithya-oss/changesets-release/confluence #131

Merge pull request #140 from alithya-oss/changesets-release/confluence

Merge pull request #140 from alithya-oss/changesets-release/confluence #131

Workflow file for this run

name: Release all workspaces
on:
push:
branches:
- main
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
find-changed-workspaces:
name: Detect workspace changes
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
workspaces: ${{ steps.find-changed-workspaces.outputs.workspaces }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # 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 }}
permissions:
contents: write
pull-requests: write
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