-
Notifications
You must be signed in to change notification settings - Fork 36
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
core: Add changesets releases #395
Changes from 5 commits
16da547
2291688
e3bd76a
01c02bd
986f3b9
be751d4
1f44407
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ | ||
"repo": "ebay/ebayui-core-react" | ||
} | ||
], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ebay/ui-core-react": patch | ||
--- | ||
|
||
Add changeset release actions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'Action: Deploy Storybook' | ||
description: 'Composite storybook deploy action' | ||
|
||
inputs: | ||
branch: | ||
description: branch name | ||
required: false | ||
default: main | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build Storybook | ||
shell: sh | ||
run: NODE_OPTIONS=--openssl-legacy-provider yarn build-storybook --output-dir storybook-static/${{ inputs.branch }} | ||
|
||
- name: Publish Storybook | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: storybook-static | ||
clean: false | ||
|
||
- name: Output storybook link | ||
shell: sh | ||
run: | | ||
echo "Storybook published: https://opensource.ebay.com/ebayui-core-react/${{ inputs.branch }}/index.html" >> $GITHUB_STEP_SUMMARY |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Action: 🦋 Changesets Release' | ||
description: 'Release a new version of the package using changesets' | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Enter prerelease mode | ||
shell: sh | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
run: yarn prerelease:start | ||
|
||
- name: Exit prerelease mode | ||
shell: sh | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: yarn prerelease:end | ||
HenriqueLimas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Release | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: yarn version | ||
publish: yarn release | ||
commit: "ci: release" | ||
title: "ci: release" | ||
env: | ||
# Disable husky | ||
HUSKY: 0 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
"version": "7.4.0", | ||
"description": "Skin components build off React", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org" | ||
"registry": "https://registry.npmjs.org", | ||
"directory": "dist" | ||
}, | ||
"exports": { | ||
"./ebay-dialog-base/components/animation": { | ||
|
@@ -87,6 +88,7 @@ | |
"lint": "eslint . --ext ts,tsx", | ||
"lint:ci": "eslint . --ext .ts,.tsx -f @microsoft/eslint-formatter-sarif -o eslint-results.sarif", | ||
"coverage": "yarn clean && yarn test --coverage --ci", | ||
"change": "changeset add", | ||
"eslint-local": "eslint . --ext ts,tsx", | ||
"eslint": "eslint . --ext .ts,.tsx -f checkstyle -o ./lint/checkstyle-result.xml", | ||
"format": "eslint . --fix 'src/**/*.{ts,tsx}'", | ||
|
@@ -100,9 +102,11 @@ | |
"update-icons": "node ./scripts/update-icons", | ||
"copy": "copyfiles package.json README.md dist; yarn copy:rest", | ||
"copy:rest": "yarn copyfiles -u 1 'src/**/*.md' dist", | ||
"release": "yarn clean && yarn build && yarn copy && CI=1 npm publish dist/ --access public", | ||
"release:rc": "yarn clean && yarn build && yarn copy && CI=1 npm publish --tag rc dist/", | ||
"prepare": "node scripts/husky-install || node ../scripts/husky-install" | ||
"release": "yarn clean && yarn build && yarn copy && CI=1 changeset publish", | ||
"prerelease:end": "changeset pre exit || :", | ||
"prerelease:start": "changeset pre enter next || :", | ||
"prepare": "node scripts/husky-install || node ../scripts/husky-install", | ||
"version": "yarn update-icons && git add -A src && changeset version" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One issue we found was that when doing a release, the package-lock version does not get changed. By doing npm i --package-lock-only this will regenerate the package-lock version. That said, I don't know if theres an equivalent or similar problem for yarn. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does changeset changes the version of the lock file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see the issue now, although |
||
}, | ||
"lint-staged": { | ||
"src/**/*.{ts,tsx}": [ | ||
|
@@ -138,6 +142,7 @@ | |
"@babel/preset-react": "^7.23.3", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@babel/register": "^7.0.0", | ||
"@changesets/cli": "^2.27.11", | ||
"@ebay/skin": "^18.4.0", | ||
"@microsoft/eslint-formatter-sarif": "^3.0.0", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems more like a feature, so Id put it in a minor version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically I don't need a version for this, it was just to test the action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this changeset. It is a
core
change that doesn't need a version update