build(lerna): add release script (#24374)

This commit is contained in:
Liam DeBeasi
2021-12-13 11:12:02 -05:00
committed by GitHub
parent 179cbd334b
commit 4a9e1ed247

52
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: 'Ionic Release'
on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: Which version should be published?
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
tag:
required: true
type: choice
description: Which npm tag should this be published to?
options:
- latest
- next
- dev
prefix:
type: choice
description: For pre-releases, what kind of pre-release is this?
default: ''
options:
- alpha
- beta
- rc
jobs:
dev-build:
runs-on: ubuntu-latest
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 }}
- name: Release
run: |
HUSKY_SKIP_HOOKS=1 lerna publish $(echo "${{ github.event.inputs.version }}") --no-verify-access --yes --force-publish='*' --dist-tag $(echo "${{ github.events.inputs.tag }}") --no-git-tag-version --no-push --skip-npm --preid $(echo "${{ github.events.inputs.prefix }}")
shell: bash