You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
No, it's not a problem. Instead is the opposite
Describe the solution you'd like
I build a workflow with github actions to automate the releases with tags and the generation of the CHANGELOG.md file based on the commits format.
I would like to share the basic template of the workflow with you, and if you consider it we can work on it to improve the flow and validations to build the release, etc.
Here is the code:
name: Release new versionon:
pull_request:
branches: [master]types: [closed] # merged? here recommend the closed type: https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/ci-cd/github-actions/triggers.htmlpaths-ignore:
- '*.md'jobs:
build:
name: Publish new releaseruns-on: ubuntu-lateststrategy:
matrix:
node-version: [16.x] # Configurable# if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'staging' # To configure better, for only merged pull requests from staging to main to trigger the stepssteps:
- uses: actions/checkout@v2with:
ref: ${{ github.head_ref }}token: ${{ secrets.GITHUB_TOKEN }} # maybe we will need to change it bu as this is a public repo, it may work# Generate tag and the version of the current release, without releasing it
- name: Bump version and push tagid: tag_versionuses: mathieudutour/github-tag-action@v6.0with:
github_token: ${{ secrets.GITHUB_TOKEN }}release_branches: masterpre_release_branches: stagingappend_to_pre_release_tag: 'pre-'# Generate the release
- name: Create a GitHub releaseuses: ncipollo/release-action@v1with:
tag: ${{ steps.tag_version.outputs.new_tag }}name: Release ${{ steps.tag_version.outputs.new_tag }}body: ${{ steps.tag_version.outputs.changelog }}
- name: Update Changeloguses: stefanzweifel/changelog-updater-action@v1with:
# Pass extracted release date, release notes and version to the Action.latest-version: ${{ steps.tag_version.outputs.new_tag }}release-notes: ${{ steps.tag_version.outputs.changelog }}release-date: ${{ steps.tag_version.outputs.release_date }}compare-url-target-revision: ${{ github.event.pull_request.head.ref }}
- name: Commit updated CHANGELOGuses: stefanzweifel/git-auto-commit-action@v4with:
skip_fetch: falseskip_checkout: falsebranch: ${{ github.event.pull_request.base.ref }}commit_message: Update CHANGELOG for ${{ steps.tag_version.outputs.new_tag }}file_pattern: CHANGELOG.mdpush_options: '--force'# I believe we will have to dinamicaly configure this parameters to be able to commit the new changelog.md file# commit_user_name: John Doe # defaults to "github-actions[bot]"# commit_user_email: john.doe@mail.com # defaults to "github-actions[bot]@users.noreply.github.com"# commit_author: John Doe <john.doe@mail.com> # defaults to author of the commit that triggered the run```Best regards.
The text was updated successfully, but these errors were encountered:
Hey cool suggestion but changelog generation is not automated and I gave up this fully automated releases and made it semi-automated. NPM release is anyway manual with 2FA. It causes lot of problems when you wanna eliminate all the manual process. So many cases come up in time. Its like this classic joke eventually; Don't waste time manually doing a task in 6 minutes where you can fail to automate it 6 hours ;)
Is your feature request related to a problem? Please describe.
No, it's not a problem. Instead is the opposite
Describe the solution you'd like
I build a workflow with github actions to automate the releases with tags and the generation of the CHANGELOG.md file based on the commits format.
I would like to share the basic template of the workflow with you, and if you consider it we can work on it to improve the flow and validations to build the release, etc.
Here is the code:
The text was updated successfully, but these errors were encountered: