Skip to content
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: create tags and commit on prerelease create #69

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ jobs:
# save the value would be created, then remove all changes
current_version=$(npm pkg get version | sed 's/"//g')
if [[ current_version == *${PREID}* ]]; then
echo "creating prerelease version"
# if the current version is a prerelease, we can just bump the prerelease number
new_version=$(npm version prerelease --no-commit-hooks --no-git-tag-version)
new_version=$(npm version prerelease)
else
# if the current version is not a prerelease, we need to add a prerelease number
new_version=$(npm version --no-commit-hooks --no-git-tag-version --preid=${PREID} pre${{ inputs.semver_type }})
new_version=$(npm version --preid=${PREID} pre${{ inputs.semver_type }})
fi
git reset --hard
else
echo "creating new release"
new_version=$(npm version ${{ inputs.semver_type }} --sign-git-tag )
git push && git push --tags
fi
echo "Created version ${new_version}"
git push && git push --tags
echo "version_number=$new_version" >> $GITHUB_OUTPUT

- id: pack_tar
Expand Down