forked from kubesphere/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ksc-release-4.1] ci: add changesets (kubesphere#4266)
* ci: add changesets Signed-off-by: donniean <[email protected]> * ci: add changesets ci Signed-off-by: donniean <[email protected]> * chore: update package.json Signed-off-by: donniean <[email protected]> * ci: update changesets Signed-off-by: donniean <[email protected]> * ci: add snapshot actions Signed-off-by: donniean <[email protected]> --------- Signed-off-by: donniean <[email protected]> Co-authored-by: donniean <[email protected]>
- Loading branch information
Showing
7 changed files
with
538 additions
and
7 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,14 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [["@ks-console/*"]], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "ksc", | ||
"updateInternalDependencies": "patch", | ||
"ignore": ["extensions/*"], | ||
"snapshot": { | ||
"useCalculatedVersion": true | ||
} | ||
} |
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,37 @@ | ||
name: Release Packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- ksc-next | ||
- ksc-next-* | ||
- ksc-next/* | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release-packages: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Build Packages | ||
run: yarn build:packages | ||
|
||
- name: Generate changeset | ||
run: yarn changeset version --snapshot next | ||
|
||
- name: Publish | ||
run: yarn changeset publish --no-git-tag --tag next | ||
env: | ||
NPM_TOKEN: ${{ secrets.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release Packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- ksc | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release-packages: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Build Packages | ||
run: yarn build:packages | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: yarn release:packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.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
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 @@ | ||
#!/bin/sh | ||
|
||
TAG=$1 | ||
|
||
if [ -z "$TAG" ]; then | ||
echo "Error: No tag provided. Usage: yarn run release:packages:snapshot -- <tag>" | ||
exit 1 | ||
fi | ||
|
||
changeset version --snapshot "$TAG" && | ||
changeset publish --no-git-tag --tag "$TAG" |
Oops, something went wrong.