Skip to content

Commit 96910f7

Browse files
Update publish.yml
1 parent af613bf commit 96910f7

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ on:
1010
- '.github/workflows/publish.yml'
1111
workflow_dispatch:
1212
inputs:
13-
publish:
14-
description: 'Publish to npm'
15-
required: false
16-
type: boolean
17-
default: false
13+
package:
14+
description: 'Package to publish'
15+
required: true
16+
type: choice
17+
options:
18+
- none
19+
- core
20+
- actions
21+
- all
22+
default: none
1823

1924
permissions:
2025
contents: read
@@ -41,16 +46,18 @@ jobs:
4146
- name: Install dependencies
4247
run: pnpm install --no-frozen-lockfile
4348

44-
- name: Build packages
49+
- name: Build core
50+
if: inputs.package == 'core' || inputs.package == 'all'
4551
run: pnpm build
4652
working-directory: packages/core
4753

4854
- name: Build actions
55+
if: inputs.package == 'actions' || inputs.package == 'all'
4956
run: pnpm build
5057
working-directory: packages/actions
5158

5259
- name: Publish core
53-
if: github.event_name == 'workflow_dispatch' && inputs.publish
60+
if: inputs.package == 'core' || inputs.package == 'all'
5461
run: |
5562
npm config set provenance true
5663
echo "Publishing @pipeit/core..."
@@ -60,7 +67,7 @@ jobs:
6067
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6168

6269
- name: Publish actions
63-
if: github.event_name == 'workflow_dispatch' && inputs.publish
70+
if: inputs.package == 'actions' || inputs.package == 'all'
6471
run: |
6572
npm config set provenance true
6673
echo "Publishing @pipeit/actions..."

0 commit comments

Comments
 (0)