-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: enhance monorepo release flow with
changesets
(#884)
ci: enhance monorepo release flow with changesets
- Loading branch information
Showing
5 changed files
with
694 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "trendmicro-frontend/tonic-ui" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "v2", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This workflow will release the packages with Changesets | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- v2 | ||
workflow_dispatch: | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
# [IMPORTANT] Prevent this action from running on forks | ||
if: github.repository == 'trendmicro-frontend/tonic-ui' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
issues: write # to post issue comments (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Ensure the full git history is available so that `changesets` can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
- name: Setup Node | ||
id: setup-node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
id: install-dependencies | ||
run: yarn install | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@master | ||
with: | ||
title: "chore(release): version packages" | ||
commit: "chore(release): version packages [skip ci]" | ||
# This expects you to have a script called release which does a build for your packages and calls `changeset publish` | ||
# publish: yarn ci-publish | ||
# This expects you to have a script called version that runs some logic and then calls `changeset version`. | ||
# version: yarn changeset version | ||
env: | ||
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} | ||
#NPM_TOKEN: ${{ env.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.