mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-12-19 05:19:42 +08:00
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: 'Ionic Dev Build'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
dev-build:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.dev-build.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
- name: Install Dependencies
|
|
run: npm ci --no-package-lock && lerna bootstrap --ignore-scripts -- --legacy-peer-deps
|
|
shell: bash
|
|
- name: Prepare NPM Token
|
|
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
|
|
shell: bash
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
# 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: Create Dev Hash
|
|
run: |
|
|
echo "HASH=1$(git log -1 --format=%H | cut -c 1-7)" >> $GITHUB_ENV
|
|
echo "TIMESTAMP=1$(date +%s)" >> $GITHUB_ENV
|
|
echo "CURRENT_VERSION=$(node ./.scripts/bump-version.js)" >> $GITHUB_ENV
|
|
shell: bash
|
|
- name: Create Dev Build
|
|
run: |
|
|
HUSKY_SKIP_HOOKS=1 lerna publish $(echo "${{ env.CURRENT_VERSION }}")-dev.$(echo "${{ env.TIMESTAMP }}").$(echo "${{ env.HASH }}") --no-verify-access --yes --force-publish='*' --dist-tag dev --no-git-tag-version --no-push --exact
|
|
shell: bash
|
|
- id: dev-build
|
|
run: echo "::set-output name=version::$(echo "${{ env.CURRENT_VERSION }}")-dev.$(echo "${{ env.TIMESTAMP }}").$(echo "${{ env.HASH }}")"
|
|
get-build:
|
|
name: Get your dev build!
|
|
runs-on: ubuntu-latest
|
|
needs: dev-build
|
|
steps:
|
|
- run: echo ${{ needs.dev-build.outputs.version }}
|
|
|