Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .github/workflows/release-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ concurrency:
on:
workflow_call:
inputs:
type:
semver-type:
type: string
default: minor
required: true
type:
type: string
default: first minor rc
dry-run:
default: first rc
required: true
description: 'Run dry run?'
dry-run:
type: boolean
default: true
required: true
description: 'Run dry run?'

# Required for OIDC publishing https://docs.npmjs.com/trusted-publishers
permissions:
Expand Down Expand Up @@ -117,27 +121,36 @@ jobs:
fi

- name: Publish full minor release (ie. v1.x.0)
if: github.event.inputs.type == 'full minor release'
if: |
github.event.inputs.type == 'full release' &&
github.event.inputs.semver-type == 'minor'
run: |
yarn lerna publish minor --conventional-graduate $(echo "${{ env.PUBLISH }}")

- name: Publish first minor RC (ie. v1.x.0-rc.0)
if: github.event.inputs.type == 'first minor rc'
if: |
github.event.inputs.type == 'first rc' &&
github.event.inputs.semver-type == 'minor'
run: |
yarn lerna publish preminor --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")

- name: Publish full patch release (ie. v1.0.x)
if: github.event.inputs.type == 'full patch release'
if: |
github.event.inputs.type == 'full release' &&
github.event.inputs.semver-type == 'patch'
run: |
yarn lerna publish patch --conventional-graduate $(echo "${{ env.PUBLISH }}")

- name: Publish first patch RC (ie. v1.0.x-rc.0)
if: github.event.inputs.type == 'first patch rc'
if: |
github.event.inputs.type == 'first rc' &&
github.event.inputs.semver-type == 'patch'
run: |
yarn lerna publish prepatch --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")

- name: Publish subsequent RC (ie. v1.0.0-rc.x)
if: github.event.inputs.type == 'subsequent rc'
if: |
github.event.inputs.type == 'subsequent rc'
run: |
yarn lerna publish --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")

Expand All @@ -152,9 +165,7 @@ jobs:
# After successfully publishing a full release, trigger the production storybook environment deployment workflow.
# Pass in the release branch name to the storybook deployment job so it build off the release branch
- name: Dispatch production storybook deployment workflow
if:
${{ (github.event.inputs.type == 'full minor release') ||
(github.event.inputs.type == 'full patch release') }}
if: github.event.inputs.type == 'full release'
uses: peter-evans/repository-dispatch@v4
with:
event-type: deploy-latest-storybook
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/release-canary.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/release-patch.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/release-preminor.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/release-scheduled.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# Publish minor releases, both rc (release candidates) and full releases
name: Release - minor
# Publish minor or patch releases, both rc (release candidates) and full stable releases
name: Release start - minor / patch
run-name:
${{ inputs.type }} - dry-run:${{ inputs.dry-run }}

on:
workflow_dispatch:
inputs:
semver-type:
description: 'Specify the type of semver release'
required: true
type: choice
default: minor
options:
- minor
- patch
type:
description: 'Specify the type of release (stable, preview, etc.)'
required: true
description: 'Specify the type of release'
type: choice
default: first minor rc
# Full minor release (ie. v2.0.0 -> v2.1.0)
# First minor RC (ie. v2.0.0 -> v2.1.0-rc.0)
default: first rc
# Full release (ie. v2.0.0 -> v2.1.0)
# First RC (ie. v2.0.0 -> v2.1.0-rc.0)
# Subsequent RC (ie v2.1.0-rc.0 -> v2.1.0-rc.1)
options:
- full minor release
- first minor rc
- full release
- first rc
- subsequent rc
dry-run:
# Check dry run to test run lerna and confirm package version bumps
Expand All @@ -30,6 +38,7 @@ jobs:
# trigger the input data to the `release-base` workflow and trigger it
uses: ./.github/workflows/release-base.yml
with:
semver-type: ${{ inputs.semver-type }}
type: ${{ inputs.type }}
dry-run: ${{ inputs.dry-run }}
secrets: inherit
90 changes: 0 additions & 90 deletions .github/workflows/release-v1.yml

This file was deleted.

Loading