Skip to content

Commit

Permalink
ci: remove PR requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Oct 20, 2024
1 parent e1a2fd8 commit 64b21dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "IS_PRE_RELEASE=false" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
fi
- run: npm version ${{ env.RELEASE_VERSION }} --no-git-tag-version --no-commit
- run: npm version ${{ env.RELEASE_VERSION }} --no-git-tag-version
- run: npm run build
- name: Publish to npm
run: npm publish --tag ${{ env.RELEASE_TAG }}
Expand All @@ -42,34 +42,3 @@ jobs:
git push origin version-bump/${{ env.RELEASE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Create a Pull Request with the version bump if the release is not a pre-release
- name: Create Pull Request for Version Bump
if: success() && env.IS_PRE_RELEASE == 'false'
id: create_pull_request
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update package version to ${{ env.RELEASE_VERSION }}
title: "chore: update package version to ${{ env.RELEASE_VERSION }}"
body: "Updates `package.json` version to `${{ env.RELEASE_VERSION }}`."
branch: version-bump/${{ env.RELEASE_VERSION }}
labels: version-bump
token: ${{ secrets.GITHUB_TOKEN }}
base: main

# Auto-merge the Pull Request with the version bump if the release is not a pre-release
- name: Enable Auto-Merge
if: success() && env.IS_PRE_RELEASE == 'false'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.create_pull_request.outputs.pull-request-number }}
token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash

# Clean up the version bump branch after merge
- name: Delete Version Bump Branch
if: success() && env.IS_PRE_RELEASE == 'false'
run: |
git push origin --delete version-bump/${{ env.RELEASE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ If you have the repo cloned locally, you can test run the CLI by running:
# Publishing

Create a GitHub release with the version number you want to create. Make sure the tag you create matches the version number (e.g., `v1.2.3`) and release! GitHub actions will take over and attempt to publish the package version you specified. Note that a Pull request will get opened on the repo automatically to bump the package version to align with the latest release. This PR should be merged ASAP after opened to keep things in sync.
Create a GitHub release with the version number you want to create. Make sure the tag you create matches the version number (e.g., `v1.2.3`) and release! GitHub actions will take over and attempt to publish the package version you specified.

---

Expand Down

0 comments on commit 64b21dc

Please sign in to comment.