Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bring back lerna-release-action #76

Merged
merged 5 commits into from
Apr 3, 2024
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
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish
on:
pull_request:
types:
- closed
workflow_dispatch:

jobs:
publish:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'publish-on-merge'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: ExodusMovement/actions/setup/lerna@65b395a82884455e8dc0cbc32355d8864f1ec30c
with:
npm-token: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- uses: ExodusMovement/lerna-release-action/publish@5bc3d09d8259df70e96766ae300b8d33aa0eb08d
id: publish
with:
github-token: ${{ secrets.GH_AUTOMATION_PAT }}
18 changes: 18 additions & 0 deletions .github/workflows/version-dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Version dispatch
on:
pull_request:
types:
- closed

jobs:
invoke-versioning:
if: contains(github.event.pull_request.labels.*.name , 'publish-on-merge') == false && contains(github.event.pull_request.labels.*.name , 'skip-release') == false
name: Invoke version workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ExodusMovement/lerna-release-action/version-dispatch@5bc3d09d8259df70e96766ae300b8d33aa0eb08d
with:
version-workflow-id: version.yaml
github-token: ${{ secrets.GH_AUTOMATION_PAT }}
exclude-commit-types: chore,docs,test,ci
47 changes: 47 additions & 0 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Version
on:
workflow_dispatch:
inputs:
packages:
description: 'Selected packages as comma separated string, e.g. modules/storage-spec,libraries/formatting'
type: string
required: true
version-strategy:
type: choice
options:
- conventional-commits
- patch
- minor
- major
- prerelease
- prepatch
- preminor
- premajor
default: 'conventional-commits'
assignee:
description: 'Overrides the default assignee, which is the user to trigger this workflow.'
type: string
required: false

jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ExodusMovement/actions/setup/lerna@65b395a82884455e8dc0cbc32355d8864f1ec30c
with:
npm-token: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Prepare
run: yarn prepare
- name: Version
uses: ExodusMovement/lerna-release-action/version@5bc3d09d8259df70e96766ae300b8d33aa0eb08d
with:
github-token: ${{ secrets.GH_AUTOMATION_PAT }}
packages: ${{ inputs.packages }}
assignee: ${{ inputs.assignee }}
version-strategy: ${{ inputs.version-strategy }}
auto-merge: true
Loading