From dcd1d51fc77fe5185d008f201792617bab8f6844 Mon Sep 17 00:00:00 2001 From: Nate Kelley <133379588+nate-kelley-buster@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:51:53 -0800 Subject: [PATCH] fix: Add release please syntax handler and github action (#40) * fix(buster): Add release please syntax handler and github action * chore: add version tracking setup fix: update update nate rulez --- .github/workflows/release-please.yml | 22 +++++++++ .github/workflows/version-bump.yml | 73 ---------------------------- CHANGELOG.md | 0 version.txt | 0 4 files changed, 22 insertions(+), 73 deletions(-) create mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/version-bump.yml create mode 100644 CHANGELOG.md create mode 100644 version.txt diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..1e65fc3f8 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,22 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Run Release Please + uses: googleapis/release-please-action@v4 + with: + release-type: simple + path: . + token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + skip-github-release: true diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml deleted file mode 100644 index 265a56f39..000000000 --- a/.github/workflows/version-bump.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Version Bump - -on: - pull_request: - types: [closed] - branches: - - main - -jobs: - version-bump: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: read - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Configure Git - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - - - name: Determine Version Bump - id: bump - run: | - if [[ ${{ contains(github.event.pull_request.labels.*.name, 'bug') }} == 'true' ]]; then - echo "bump=patch" >> $GITHUB_OUTPUT - elif [[ ${{ contains(github.event.pull_request.labels.*.name, 'enhancement') }} == 'true' ]]; then - echo "bump=minor" >> $GITHUB_OUTPUT - elif [[ ${{ contains(github.event.pull_request.labels.*.name, 'breaking') }} == 'true' ]]; then - echo "bump=major" >> $GITHUB_OUTPUT - else - echo "bump=none" >> $GITHUB_OUTPUT - fi - - - name: Bump Version - if: steps.bump.outputs.bump != 'none' - id: version - run: | - NEW_VERSION=$(npm run version:${{ steps.bump.outputs.bump }} --silent) - echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT - - - name: Push changes - if: steps.bump.outputs.bump != 'none' - run: | - git push - git push --tags - - - name: Create GitHub Release - if: steps.bump.outputs.bump != 'none' - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ steps.version.outputs.new_version }} - name: Release ${{ steps.version.outputs.new_version }} - body: | - Changes in this release: - ${{ github.event.pull_request.title }} - - ${{ github.event.pull_request.body }} - - PR: #${{ github.event.pull_request.number }} - draft: false - prerelease: false \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..e69de29bb diff --git a/version.txt b/version.txt new file mode 100644 index 000000000..e69de29bb