-
Notifications
You must be signed in to change notification settings - Fork 54
fix: Improve release #322
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
fix: Improve release #322
Changes from all commits
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 | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -40,13 +40,14 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||
run: pnpm run build | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
- name: Tag and Publish Packages | ||||||||||||||||||||||||||||||||||||||||||||
id: tag_publish | ||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish | ||||||||||||||||||||||||||||||||||||||||||||
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
- name: Generate Changelog | ||||||||||||||||||||||||||||||||||||||||||||
- name: Generate Changelog with standard-version | ||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||
npx lerna-changelog > CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||
npx standard-version --tag-prefix v --commit-all | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
- name: Commit and Push Changelog | ||||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -55,3 +56,14 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||
git push origin HEAD:${{ github.ref }} | ||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
- name: Create GitHub Release | ||||||||||||||||||||||||||||||||||||||||||||
uses: actions/create-release@v1 | ||||||||||||||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||||||||||||||
tag_name: ${{ steps.tag_publish.outputs.TAG }} | ||||||||||||||||||||||||||||||||||||||||||||
release_name: Release ${{ steps.tag_publish.outputs.TAG }} | ||||||||||||||||||||||||||||||||||||||||||||
body_path: CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||||||
draft: false | ||||||||||||||||||||||||||||||||||||||||||||
prerelease: ${{ contains(github.event.inputs.release_type, 'pre') }} | ||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+60
to
+69
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. Replace deprecated action and improve release content The Replace with the newer - name: Create GitHub Release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ steps.tag_publish.outputs.TAG }}
- release_name: Release ${{ steps.tag_publish.outputs.TAG }}
- body_path: CHANGELOG.md
- draft: false
- prerelease: ${{ contains(github.event.inputs.release_type, 'pre') }}
+ name: Create GitHub Release
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: ${{ steps.tag_publish.outputs.TAG }}
+ name: Release ${{ steps.tag_publish.outputs.TAG }}
+ body: |
+ # Release Notes
+ $(cat CHANGELOG.md | sed -n "/^## \[${{ steps.tag_publish.outputs.TAG }}/,/^## \[/p" | sed '$d')
+ draft: false
+ prerelease: ${{ contains(github.event.inputs.release_type, 'pre') }}
+ token: ${{ secrets.GITHUB_TOKEN }} This change:
📝 Committable suggestion
Suggested change
|
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.
💡 Codebase verification
Keep
--force-publish
flag and add explicit output captureThe
--force-publish
flag is necessary due to the extensive interdependencies between packages. The packages form a complex dependency graph where:sdk
depends oncore
,create-burner
, andtorii-client
react
depends onstate
,torii-client
, andutils
state
depends ontorii-client
torii-client
Only add the output capture modification:
🔗 Analysis chain
Add explicit output capture for the tag version
The step ID
tag_publish
suggests this step should output the tag version, but there's no explicit output capture. This could cause the subsequent GitHub Release step to fail.Apply this modification:
Also, consider removing the
--force-publish
flag unless absolutely necessary, as it bypasses version checks and could lead to unintended publications.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 510
Script:
Length of output: 2793