mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: "Ionic Dev Build"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
create-dev-hash:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
dev-hash: ${{ steps.create-dev-hash.outputs.DEV_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-dev-hash
|
|
name: Create Dev Hash
|
|
run: |
|
|
echo "DEV_HASH=$(node ./.scripts/bump-version.js)-dev.1$(date +%s).1$(git log -1 --format=%H | cut -c 1-7)" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
release-ionic:
|
|
needs: [create-dev-hash]
|
|
permissions:
|
|
id-token: write
|
|
uses: ./.github/workflows/release-ionic.yml
|
|
with:
|
|
tag: dev
|
|
version: ${{ needs.create-dev-hash.outputs.dev-hash }}
|
|
secrets:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
get-build:
|
|
name: Get your dev build!
|
|
runs-on: ubuntu-latest
|
|
needs: [create-dev-hash, release-ionic]
|
|
steps:
|
|
- run: echo ${{ needs.create-dev-hash.outputs.dev-hash }}
|
|
|
|
comment-on-pr:
|
|
runs-on: ubuntu-latest
|
|
needs: [create-dev-hash, release-ionic]
|
|
continue-on-error: true
|
|
outputs:
|
|
pr-number: ${{ steps.PR.outputs.number }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: 8BitJonny/gh-get-current-pr@2.2.0
|
|
id: PR
|
|
|
|
- name: Comment on PR
|
|
uses: thollander/actions-comment-pull-request@v2
|
|
with:
|
|
message: |
|
|
A dev build has been generated for this PR. To use the dev build, update your Ionic packages to the following version:
|
|
```
|
|
${{ needs.create-dev-hash.outputs.dev-hash }}
|
|
```
|
|
pr_number: ${{ steps.PR.outputs.number }}
|
|
comment_tag: dev-build
|