-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (43 loc) · 1.49 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # 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