-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try adding CI inputs to define whether a major version shall be released
Co-authored-by: Mukul Mishra <[email protected]> Co-authored-by: Giuseppe Samela <[email protected]>
- Loading branch information
1 parent
333dbd7
commit 425804b
Showing
2 changed files
with
38 additions
and
28 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 |
---|---|---|
|
@@ -2,6 +2,12 @@ name: Release new version | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
is-major-release: | ||
type: boolean | ||
description: Is this a major release? | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
release: | ||
|
@@ -47,30 +53,30 @@ jobs: | |
with: | ||
script: | | ||
const { defineReleaseVersion } = require('./.github/scripts/defineVersion.js') | ||
return defineReleaseVersion({core}, "${{ steps.read-latest-release-version.outputs.latestReleaseVersion }}", './CHANGELOG.md' ) | ||
return defineReleaseVersion({core}, "${{ steps.read-latest-release-version.outputs.latestReleaseVersion }}", './CHANGELOG.md', ${{ inputs.is-major-release }}) | ||
- name: Bump package.json and Changelog version | ||
run: | | ||
npm --no-git-tag-version version "${{ fromJson(steps.define-release-version.outputs.result) }}" | ||
npx kacl release | ||
- name: Add tag and push changes | ||
run: | | ||
git config --global user.name 'Automated Release' | ||
git config --global user.email '[email protected]' | ||
git add . | ||
git commit -m "Bump version and update changelog" | ||
git tag -a "${{ fromJson(steps.define-release-version.outputs.result) }}" -m "v${{ fromJson(steps.define-release-version.outputs.result) }}" | ||
git push origin develop | ||
git push origin --tags | ||
- name: build and publish | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | ||
npm publish | ||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
generate_release_notes: true | ||
tag_name: ${{ fromJson(steps.define-release-version.outputs.result) }} | ||
# - name: Bump package.json and Changelog version | ||
# run: | | ||
# npm --no-git-tag-version version "${{ fromJson(steps.define-release-version.outputs.result) }}" | ||
# npx kacl release | ||
# | ||
# - name: Add tag and push changes | ||
# run: | | ||
# git config --global user.name 'Automated Release' | ||
# git config --global user.email '[email protected]' | ||
# git add . | ||
# git commit -m "Bump version and update changelog" | ||
# git tag -a "${{ fromJson(steps.define-release-version.outputs.result) }}" -m "v${{ fromJson(steps.define-release-version.outputs.result) }}" | ||
# git push origin develop | ||
# git push origin --tags | ||
# | ||
# - name: build and publish | ||
# run: | | ||
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | ||
# npm publish | ||
# | ||
# - name: Create GitHub release | ||
# uses: softprops/action-gh-release@v2 | ||
# with: | ||
# generate_release_notes: true | ||
# tag_name: ${{ fromJson(steps.define-release-version.outputs.result) }} |