mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-12-19 05:19:42 +08:00
Issue number: internal --------- <!-- 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. --> - Release workflows still inject a long-lived `NPM_TOKEN` via `.npmrc`, so publishes do not use npm’s trusted OIDC flow. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The shared `actions/publish-npm` composite action now configures `setup-node` with the npm registry, upgrades npm in place, and publishes with `--provenance` without writing `.npmrc`. - `release-dev.yml`, `release-nightly.yml`, and `release-production.yml` call into that trusted flow by removing the token input and (for production) inlining the same OIDC setup before `npm run release.ci`. - Allows npm to authenticate through trusted publishing requirements [docs.npmjs.com/trusted-publishers](https://docs.npmjs.com/trusted-publishers). - Step names were refreshed with emojis, but there are no other behavioral changes. ## 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. --> - These changes align the Ionic release automation with npm’s trusted-publisher enforcement while keeping the existing Lerna build/publish process intact. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
218 lines
6.5 KiB
YAML
218 lines
6.5 KiB
YAML
name: 'Ionic Framework Build'
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ '**' ]
|
|
merge_group:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ionicons_npm_release_tag:
|
|
required: false
|
|
type: string
|
|
description: What version of ionicons should be pulled from NPM? Use this if you want to test a custom version of Ionicons with Ionic.
|
|
|
|
# When pushing a new commit we should
|
|
# cancel the previous test run to not
|
|
# consume more runners than we need to.
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-core:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-core
|
|
with:
|
|
ionicons-version: ${{ inputs.ionicons_npm_release_tag }}
|
|
|
|
test-core-clean-build:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-core-clean-build
|
|
|
|
test-core-lint:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-core-lint
|
|
|
|
test-core-spec:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-core-spec
|
|
|
|
test-core-screenshot:
|
|
strategy:
|
|
matrix:
|
|
# Divide the tests into n buckets
|
|
# and run those buckets in parallel.
|
|
# To increase the number of shards,
|
|
# add new items to the shard array
|
|
# and change the value of totalShards
|
|
# to be the length of the shard array.
|
|
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
totalShards: [20]
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-core-screenshot
|
|
with:
|
|
shard: ${{ matrix.shard }}
|
|
totalShards: ${{ matrix.totalShards }}
|
|
|
|
# Screenshots are required to pass
|
|
# in order for the branch to be merge
|
|
# eligible. However, the screenshot tests
|
|
# are run on n runners where n can change
|
|
# over time. The verify-screenshots step allows
|
|
# us to have a required status check for screenshot
|
|
# results without having to manually add each
|
|
# matrix run in the branch protection rules
|
|
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
|
|
verify-screenshots:
|
|
if: ${{ always() }}
|
|
needs: test-core-screenshot
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-core-screenshot.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-vue:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-vue
|
|
|
|
build-vue-router:
|
|
needs: [build-vue]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-vue-router
|
|
|
|
test-vue-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [vue3]
|
|
needs: [build-vue, build-vue-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-vue-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-vue-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-vue-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-vue-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-angular:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-angular
|
|
|
|
build-angular-server:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-angular-server
|
|
|
|
test-angular-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [ng16, ng17, ng18, ng19, ng20]
|
|
needs: [build-angular, build-angular-server]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-angular-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-angular-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-angular-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-angular-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
build-react:
|
|
needs: [build-core]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-react
|
|
|
|
build-react-router:
|
|
needs: [build-react]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/build-react-router
|
|
|
|
test-react-router-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [reactrouter5]
|
|
needs: [build-react, build-react-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-react-router-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-react-router-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-react-router-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-react-router-e2e.result != 'success' }}
|
|
run: exit 1
|
|
|
|
test-react-e2e:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
apps: [react17, react18, react19]
|
|
needs: [build-react, build-react-router]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: ./.github/workflows/actions/test-react-e2e
|
|
with:
|
|
app: ${{ matrix.apps }}
|
|
|
|
verify-test-react-e2e:
|
|
if: ${{ always() }}
|
|
needs: test-react-e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check build matrix status
|
|
if: ${{ needs.test-react-e2e.result != 'success' }}
|
|
run: exit 1
|