Skip to content

Commit 49d5d08

Browse files
ampagentlishaduck
authored andcommitted
1 parent 41fbb38 commit 49d5d08

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

.github/workflows/release.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- main
77

8+
permissions: {}
9+
810
concurrency:
911
group: ${{ github.workflow }}-${{ github.ref }}
1012

@@ -14,11 +16,14 @@ jobs:
1416
name: Select Changesets Mode
1517
outputs:
1618
mode: ${{ steps.select-mode.outputs.mode }}
19+
publish-plan-artifact-id: ${{ steps.select-mode.outputs.publish-plan-artifact-id }}
1720
runs-on: ubuntu-latest
1821
permissions:
1922
contents: read
2023
steps:
2124
- uses: $/.github/actions/setup
25+
with:
26+
cache: false
2227

2328
- name: Select Changesets Mode
2429
id: select-mode
@@ -50,16 +55,40 @@ jobs:
5055
with:
5156
github-token: ${{ steps.create_token.outputs.token }}
5257

53-
publish:
58+
pack:
5459
if: needs.select-mode.outputs.mode == 'publish'
55-
name: Publish Packages
60+
name: Pack Packages
5661
needs: select-mode
62+
outputs:
63+
pack-dir-artifact-id: ${{ steps.pack.outputs.pack-dir-artifact-id }}
64+
runs-on: ubuntu-latest
65+
permissions:
66+
contents: read
67+
steps:
68+
- uses: $/.github/actions/setup
69+
with:
70+
cache: false
71+
72+
- name: Build Packages
73+
run: pnpm build
74+
75+
- name: Pack Packages
76+
id: pack
77+
uses: changesets/action/pack@22ccf9aa43179fe9e27dc62e575971d28cce197c # v2.0.0
78+
with:
79+
publish-plan-artifact-id: ${{ needs.select-mode.outputs.publish-plan-artifact-id }}
80+
81+
publish:
82+
name: Publish Packages
83+
needs: pack
5784
runs-on: ubuntu-latest
5885
permissions:
5986
contents: read
6087
id-token: write
6188
steps:
6289
- uses: $/.github/actions/setup
90+
with:
91+
cache: false
6392

6493
- name: Create Token
6594
id: create_token
@@ -73,4 +102,4 @@ jobs:
73102
uses: changesets/action/publish@198f833dd7d863100ea6e28967bc9a9fdefadb0a # v2.1.0
74103
with:
75104
github-token: ${{ steps.create_token.outputs.token }}
76-
script: pnpm release
105+
pack-dir-artifact-id: ${{ needs.pack.outputs.pack-dir-artifact-id }}

0 commit comments

Comments
 (0)