mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Issue number: N/A --------- <!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- 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. --> Original Discussion: https://github.com/ionic-team/stencil-ds-output-targets/pull/327#discussion_r1176950960 This flag was left over from our migration from custom build scripts to Lerna. Since we use `npm ci` the `--no-package-lock` flag is not needed. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Removes `--no-package-lock` from build scripts. - Here is an example test run of a dev build succeeding without the `--no-package-lock` flag: https://github.com/ionic-team/ionic-framework/actions/runs/4801503002 ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
82 lines
2.8 KiB
YAML
82 lines
2.8 KiB
YAML
name: 'Ionic Nightly Build'
|
|
|
|
on:
|
|
schedule:
|
|
# Run every Monday-Friday
|
|
# at 6:00 UTC (6:00 am UTC)
|
|
- cron: '00 06 * * 1-5'
|
|
|
|
jobs:
|
|
create-nightly-hash:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
nightly-hash: ${{ steps.create-nightly-hash.outputs.NIGHTLY_HASH }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
# A 1 is required before the timestamp
|
|
# as lerna will fail when there is a leading 0
|
|
# See https://github.com/lerna/lerna/issues/2840
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
shell: bash
|
|
- id: create-nightly-hash
|
|
name: Create Nightly Hash
|
|
# The date should output YYYYMMDD
|
|
# so that it is human readable
|
|
run: |
|
|
echo "NIGHTLY_HASH=$(node ./.scripts/bump-version.js)-nightly.$(date +%Y%m%d)" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
release-ionic:
|
|
needs: [create-nightly-hash]
|
|
permissions:
|
|
id-token: write
|
|
uses: ./.github/workflows/release-ionic.yml
|
|
with:
|
|
tag: nightly
|
|
version: ${{ needs.create-nightly-hash.outputs.nightly-hash }}
|
|
secrets:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
finalize-release:
|
|
needs: [create-nightly-hash, release-ionic]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.IONITRON_TOKEN }}
|
|
fetch-depth: 0
|
|
- name: Configure Identity
|
|
# Commits from github-actions do not
|
|
# trigger other GitHub Actions. As a result,
|
|
# we publish releases from Ionitron instead
|
|
# so actions run when merging the release branch
|
|
# back into main.
|
|
run: |
|
|
git config user.name ionitron
|
|
git config user.email hi@ionicframework.com
|
|
shell: bash
|
|
- name: Checkout Nightly Branch
|
|
# There are branch protection rules for our version
|
|
# branches (i.e. "6.2.x"), so we cannot name the branch
|
|
# the nightly hash as it would fall under the protection
|
|
# rule. As a result, we prefix "tmp-" to the branch.
|
|
run: |
|
|
git checkout -b tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }}
|
|
git push origin tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }}
|
|
shell: bash
|
|
- name: Create GitHub Release
|
|
run: lerna version ${{ needs.create-nightly-hash.outputs.nightly-hash }} --yes --force-publish='*' --conventional-commits --conventional-prerelease --create-release github
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
shell: bash
|
|
# We need to push the commit changes in order for the tags
|
|
# to get updated, but we don't need to keep the changelog
|
|
# changes around.
|
|
- name: Delete Nightly Branch
|
|
run: |
|
|
git checkout main
|
|
git branch -D tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }}
|
|
git push origin --delete tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }}
|
|
shell: bash
|