Skip to content

Commit

Permalink
Fix autobump script
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Jan 8, 2025
1 parent 425a265 commit 47786cc
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/label-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,14 @@ jobs:
BUMP_MINOR_PRESENT: ${{ contains(github.event.pull_request.labels.*.name, 'bump minor') }}
BUMP_MAJOR_PRESENT: ${{ contains(github.event.pull_request.labels.*.name, 'bump major') }}

- name: Determine new version
id: versions
if: steps.bump-type.outputs.bump-type != 'null'
run: |
NEW_VERSION=$(npx semver $OLD_VERSION -i ${{ steps.bump-type.outputs.bump-type }})
echo "old-version=$OLD_VERSION" >> "$GITHUB_OUTPUT"
echo "new-version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Update version in cargo.toml
if: steps.bump-type.outputs.bump-type != 'null'
run: |
OLD_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "posthog-rs") | .version')
cargo set-version --bump ${{ steps.bump-type.outputs.bump-type }}
NEW_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "posthog-rs") | .version')
echo "old-version=$OLD_VERSION" >> "$GITHUB_OUTPUT"
echo "new-version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Update CHANGELOG.md
run: |
Expand All @@ -77,9 +71,6 @@ jobs:
echo -e "$CHANGELOG_HEADING\n\n$CHANGELOG_POINTS\n\n$(cat CHANGELOG.old.md)" > CHANGELOG.md
rm CHANGELOG.old.md
- name: Update lockfile
run: pnpm i

- name: Commit bump
if: steps.bump-type.outputs.bump-type != 'null'
uses: EndBug/add-and-commit@v7
Expand Down

0 comments on commit 47786cc

Please sign in to comment.