diff --git a/actions/bump-version/action.yaml b/actions/bump-version/action.yaml index 76b2762..802c369 100644 --- a/actions/bump-version/action.yaml +++ b/actions/bump-version/action.yaml @@ -18,12 +18,20 @@ runs: - name: 'Get next version' id: get_version shell: bash - run: echo "version=$(cz bump --get-next)" >> "$GITHUB_OUTPUT" + run: | + cmd="cz bump --get-next --yes" + + if [ -n "${{ inputs.prerelease }}" ]; then + cmd="$cmd --prerelease ${{ inputs.prerelease }}" + fi + + version=$($cmd) + echo "version=$version" >> "$GITHUB_OUTPUT" - name: 'Generate changelog' shell: bash run: | - cmd="cz bump --files-only --changelog" + cmd="cz bump --files-only --changelog --yes" if [ -n "${{ inputs.prerelease }}" ]; then cmd="$cmd --prerelease ${{ inputs.prerelease }}" diff --git a/actions/is-beta-tag/README.md b/actions/is-beta-tag/README.md index e6abaaa..7e8a252 100644 --- a/actions/is-beta-tag/README.md +++ b/actions/is-beta-tag/README.md @@ -4,7 +4,7 @@ This action checks if the current git tag uses the beta release format. The expe ## Action outputs -- `is_beta_tag`: A boolean indicating whether the current git tag uses the beta release format. +- `is_beta_tag`: A stringified boolean indicating whether the current git tag uses the beta release format. ## Example usage @@ -34,6 +34,6 @@ jobs: with: tag: '${{ github.ref_name }}' commit: 'main' - prerelease: ${{ steps.is_beta_tag.outputs.is_beta_tag == true }} - makeLatest: ${{ steps.is_beta_tag.outputs.is_beta_tag == false }} + prerelease: ${{ steps.is_beta_tag.outputs.is_beta_tag == 'true' }} + makeLatest: ${{ steps.is_beta_tag.outputs.is_beta_tag == 'false' }} ``` diff --git a/actions/is-beta-tag/action.yaml b/actions/is-beta-tag/action.yaml index 24a1df8..fe187a4 100644 --- a/actions/is-beta-tag/action.yaml +++ b/actions/is-beta-tag/action.yaml @@ -3,7 +3,7 @@ description: 'This action checks if the current git tag uses the beta release fo outputs: is_beta_tag: - description: 'A boolean indicating whether the current git tag uses the beta release format.' + description: 'A stringified boolean indicating whether the current git tag uses the beta release format.' value: ${{ steps.is_beta_tag.outputs.is_beta_tag }} runs: diff --git a/actions/npm-publish/README.md b/actions/npm-publish/README.md index 778f089..d6edc78 100644 --- a/actions/npm-publish/README.md +++ b/actions/npm-publish/README.md @@ -4,10 +4,10 @@ This action publishes a package to the npm registry. It assumes that `npm` is al ## Action inputs -| Input | Description | Default | -| --------- | ---------------------------------------------------- | ---------- | -| `token` | The npm token to authenticate with the npm registry. | _required_ | -| `is_beta` | Publish the package as a beta version. | `false` | +| Input | Description | Default | +| --------- | --------------------------------------------------------------------- | ---------- | +| `token` | The npm token to authenticate with the npm registry. | _required_ | +| `is_beta` | Publish the package as a beta version. Expects a stringified boolean. | `'false'` | ## Action outputs @@ -53,6 +53,6 @@ jobs: artifacts: ${{ steps.publish_dfinity_cns.outputs.artifact_filepath }} tag: '${{ github.ref_name }}' commit: 'main' - prerelease: ${{ steps.is_beta_tag.outputs.is_beta_tag == true }} - makeLatest: ${{ steps.is_beta_tag.outputs.is_beta_tag == false }} + prerelease: ${{ steps.is_beta_tag.outputs.is_beta_tag == 'true' }} + makeLatest: ${{ steps.is_beta_tag.outputs.is_beta_tag == 'false' }} ``` diff --git a/actions/npm-publish/action.yaml b/actions/npm-publish/action.yaml index 7249626..a376ed3 100644 --- a/actions/npm-publish/action.yaml +++ b/actions/npm-publish/action.yaml @@ -6,9 +6,9 @@ inputs: description: 'The npm token to use for authentication.' required: true is_beta: - description: 'Publish the package as a beta version.' + description: 'A stringified boolean indicating whether to publish the package as a beta version.' required: false - default: false + default: 'false' outputs: artifact_filepath: @@ -27,7 +27,7 @@ runs: echo "artifact_filepath=$artifact_filepath" >> "$GITHUB_OUTPUT" release_cmd="npm publish --access public" - if [ "${{ inputs.is_beta }}" = true ]; then + if [ "${{ inputs.is_beta }}" = 'true' ]; then release_cmd="$release_cmd --tag beta" fi