-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): be able to make multi package release
- Loading branch information
Showing
17 changed files
with
486 additions
and
452 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
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,60 @@ | ||
name: Publish SDK | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
ref: ${{ github.event.inputs.commit }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: 16 | ||
- name: Install | ||
run: yarn install | ||
- name: Build | ||
run: yarn lerna run --scope=@sentio/sdk build | ||
- name: Semantic Release | ||
id: semantic | ||
uses: cycjimmy/semantic-release-action@v3 | ||
# with: | ||
# working_directory: packages/sdk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Make Release Summary | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
echo "### New version v${{ steps.semantic.outputs.new_release_version }} cut" >> $GITHUB_STEP_SUMMARY | ||
echo "commit: ${GITHUB_SHA}, branch/tag: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY | ||
echo "automatic release will be marked as prerelease, please manually confirm in the release page" >> $GITHUB_STEP_SUMMARY | ||
echo "${{ steps.semantic.outputs.new_release_notes }}" >> $GITHUB_STEP_SUMMARY | ||
env: | ||
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
- name: report error | ||
if: steps.semantic.outputs.new_release_published == 'false' | ||
run: | | ||
echo "### No version cut" >> $GITHUB_STEP_SUMMARY | ||
echo "Check Semantic Release output for details" | ||
exit(1) | ||
- name: Lerna Publish | ||
run: | | ||
DIST_TAG=latest | ||
if [[ "${{ contains(steps.semantic.outputs.new_release_version, '-rc.') }}" == "true" ]]; then | ||
DIST_TAG=rc | ||
fi | ||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
yarn lerna publish ${{ steps.semantic.outputs.new_release_version }} --no-private --yes --no-push --no-git-tag-version --dist-tag $DIST_TAG | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
outputs: | ||
release_version: ${{ steps.release.outputs.release_version }} |
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
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
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"packages_no_need": ["sdk", "cli", "cli/templates", "examples/*"], | ||
"version__": "independent", | ||
"version": "1.0.0-development", | ||
"version": "1.0.0-rc.5", | ||
"npmClient": "yarn", | ||
"useWorkspaces": true, | ||
"stream": true, | ||
"concurrency": 1 | ||
"concurrency": 1, | ||
"command": {} | ||
} |
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
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,38 @@ | ||
module.exports = { | ||
extends: ["semantic-release-monorepo"], | ||
branches: ['release', { name: 'main', prerelease: 'rc' }], | ||
plugins: [ | ||
[ | ||
'@semantic-release/commit-analyzer', | ||
{ | ||
preset: 'angular', | ||
releaseRules: [ | ||
{ type: 'release', "scope": 'major', release: 'major' }, | ||
{ type: 'release', "scope": 'minor', release: 'minor' }, | ||
{ type: 'release', "scope": 'patch', release: 'patch' }, | ||
{ type: 'chore', release: 'patch' }, | ||
{ type: 'refactor', release: 'patch' }, | ||
], | ||
}, | ||
], | ||
["@semantic-release/npm", { | ||
}], | ||
['@semantic-release/release-notes-generator', { | ||
preset: 'conventionalcommits', | ||
presetConfig: { | ||
types: [ | ||
{ type: 'feat', section: 'Features' }, | ||
{ type: 'fix', section: 'Bug Fixes' }, | ||
{ type: 'chore', section: 'Internal', hidden: false }, | ||
{ type: 'refactor', section: 'Internal', hidden: false }, | ||
]}, | ||
}], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
successComment: false, | ||
labels: false, | ||
}, | ||
], | ||
], | ||
} |
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
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.