Skip to content

Commit 99bfdee

Browse files
authored
chore(github-actions): Review workflow structure and fine tune permissions (#30789)
Issue number: resolves # --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> - Permissions not set as expected ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Permissions are properly set throughout the hierarchy - Workflow structure prevents unintended standalone executions ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent d03e881 commit 99bfdee

File tree

6 files changed

+12
-45
lines changed

6 files changed

+12
-45
lines changed

.github/workflows/publish-npm.yml renamed to .github/actions/publish-npm/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ runs:
5757
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
5858
shell: bash
5959
working-directory: ${{ inputs.working-directory }}
60+

.github/workflows/dev-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: 'Ionic Dev Build'
22

33
on:
4-
workflow_dispatch:
54
workflow_call:
65

76
permissions:
@@ -30,6 +29,7 @@ jobs:
3029
release-ionic:
3130
needs: [create-dev-hash]
3231
permissions:
32+
contents: read
3333
id-token: write
3434
uses: ./.github/workflows/release-ionic.yml
3535
with:

.github/workflows/nightly.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: 'Ionic Nightly Build'
22

33
on:
4-
schedule:
5-
# Run every Monday-Friday
6-
# at 6:00 UTC (6:00 am UTC)
7-
- cron: '00 06 * * 1-5'
84
workflow_call:
95

106
permissions:
@@ -35,6 +31,7 @@ jobs:
3531
release-ionic:
3632
needs: [create-nightly-hash]
3733
permissions:
34+
contents: read
3835
id-token: write
3936
uses: ./.github/workflows/release-ionic.yml
4037
with:

.github/workflows/release-ionic.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27-
- uses: ./.github/workflows/publish-npm.yml
27+
- uses: ./.github/actions/publish-npm
2828
with:
2929
scope: '@ionic/core'
3030
tag: ${{ inputs.tag }}
@@ -55,7 +55,7 @@ jobs:
5555
name: ionic-docs
5656
path: ./packages/docs
5757
filename: DocsBuild.zip
58-
- uses: ./.github/workflows/publish-npm.yml
58+
- uses: ./.github/actions/publish-npm
5959
with:
6060
scope: '@ionic/docs'
6161
tag: ${{ inputs.tag }}
@@ -74,7 +74,7 @@ jobs:
7474
name: ionic-core
7575
path: ./core
7676
filename: CoreBuild.zip
77-
- uses: ./.github/workflows/publish-npm.yml
77+
- uses: ./.github/actions/publish-npm
7878
with:
7979
scope: '@ionic/angular'
8080
tag: ${{ inputs.tag }}
@@ -100,7 +100,7 @@ jobs:
100100
name: ionic-core
101101
path: ./core
102102
filename: CoreBuild.zip
103-
- uses: ./.github/workflows/publish-npm.yml
103+
- uses: ./.github/actions/publish-npm
104104
with:
105105
scope: '@ionic/react'
106106
tag: ${{ inputs.tag }}
@@ -125,7 +125,7 @@ jobs:
125125
name: ionic-core
126126
path: ./core
127127
filename: CoreBuild.zip
128-
- uses: ./.github/workflows/publish-npm.yml
128+
- uses: ./.github/actions/publish-npm
129129
with:
130130
scope: '@ionic/vue'
131131
tag: ${{ inputs.tag }}
@@ -150,7 +150,7 @@ jobs:
150150
name: ionic-core
151151
path: ./core
152152
filename: CoreBuild.zip
153-
- uses: ./.github/workflows/publish-npm.yml
153+
- uses: ./.github/actions/publish-npm
154154
with:
155155
scope: '@ionic/angular-server'
156156
tag: ${{ inputs.tag }}
@@ -176,7 +176,7 @@ jobs:
176176
name: ionic-react
177177
path: ./packages/react
178178
filename: ReactBuild.zip
179-
- uses: ./.github/workflows/publish-npm.yml
179+
- uses: ./.github/actions/publish-npm
180180
with:
181181
scope: '@ionic/react-router'
182182
tag: ${{ inputs.tag }}
@@ -201,7 +201,7 @@ jobs:
201201
name: ionic-vue
202202
path: ./packages/vue
203203
filename: VueBuild.zip
204-
- uses: ./.github/workflows/publish-npm.yml
204+
- uses: ./.github/actions/publish-npm
205205
with:
206206
scope: '@ionic/vue-router'
207207
tag: ${{ inputs.tag }}

.github/workflows/release-orchestrator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Ionic Release'
1+
name: 'Release - Ionic Framework'
22

33
on:
44
schedule:

.github/workflows/release.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,6 @@
11
name: 'Ionic Production Release'
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
required: true
8-
type: choice
9-
description: Which version should be published?
10-
options:
11-
- patch
12-
- minor
13-
- major
14-
- prepatch
15-
- preminor
16-
- premajor
17-
- prerelease
18-
tag:
19-
required: true
20-
type: choice
21-
description: Which npm tag should this be published to?
22-
options:
23-
- latest
24-
- next
25-
preid:
26-
type: choice
27-
description: Which prerelease identifier should be used? This is only needed when version is "prepatch", "preminor", "premajor", or "prerelease".
28-
default: ''
29-
options:
30-
- ''
31-
- alpha
32-
- beta
33-
- rc
34-
- next
354
workflow_call:
365
inputs:
376
version:

0 commit comments

Comments
 (0)