From f09cbe070544c4b4c8abbac8fe85b1d006483d52 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 16 Apr 2026 15:03:22 +0100 Subject: [PATCH 1/4] chore: simplify ruby release token usage --- .github/workflows/release.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cac712b..7146d8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -193,19 +193,11 @@ jobs: contents: write id-token: write steps: - - name: Get GitHub App token - id: releaser - uses: actions/create-github-app-token@v3 - with: - app-id: ${{ secrets.GH_APP_POSTHOG_RUBY_RELEASER_APP_ID }} - private-key: ${{ secrets.GH_APP_POSTHOG_RUBY_RELEASER_PRIVATE_KEY }} - - name: Checkout repository uses: actions/checkout@v6 with: ref: main fetch-depth: 0 - token: ${{ steps.releaser.outputs.token }} - name: Configure Git run: | @@ -242,17 +234,15 @@ jobs: - name: Tag repository env: - GH_TOKEN: ${{ steps.releaser.outputs.token }} NEW_VERSION: ${{ needs.version-bump.outputs.new-version }} COMMIT_HASH: ${{ needs.version-bump.outputs.commit-hash }} run: | - gh api "repos/${{ github.repository }}/git/refs" \ - -f "ref=refs/tags/${NEW_VERSION}" \ - -f "sha=${COMMIT_HASH}" + git tag -a "$NEW_VERSION" "$COMMIT_HASH" -m "$NEW_VERSION" + git push origin "$NEW_VERSION" - name: Create GitHub Release env: - GH_TOKEN: ${{ steps.releaser.outputs.token }} + GH_TOKEN: ${{ github.token }} NEW_VERSION: ${{ needs.version-bump.outputs.new-version }} run: | gh release create "$NEW_VERSION" \ From 0ca710b8af1a67560afa42c77ce71b6134160401 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 16 Apr 2026 15:06:08 +0100 Subject: [PATCH 2/4] chore: add release changeset --- .changeset/fuzzy-stars-wave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fuzzy-stars-wave.md diff --git a/.changeset/fuzzy-stars-wave.md b/.changeset/fuzzy-stars-wave.md new file mode 100644 index 0000000..eb67bf0 --- /dev/null +++ b/.changeset/fuzzy-stars-wave.md @@ -0,0 +1,5 @@ +--- +'posthog-ruby': patch +--- + +Simplify Ruby release token usage to retry the automated release flow. From 01fc35edda55919c3f72db444fea2880222e4e8a Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 16 Apr 2026 15:08:32 +0100 Subject: [PATCH 3/4] fix: update Gemfile.lock during releases --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7146d8a..4a2c646 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -125,6 +125,14 @@ jobs: NEW_VERSION: ${{ steps.apply-changesets.outputs.new-version }} run: ./scripts/bump-version.sh "$NEW_VERSION" + - name: Set up Ruby + uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0 + with: + ruby-version: ruby + + - name: Update Gemfile.lock + run: bundle lock + - name: Commit version bump id: commit-version-bump uses: planetscale/ghcommit-action@25309d8005ac7c3bcd61d3fe19b69e0fe47dbdde # v0.2.20 From b2d6621f1a67ef7d683d586ca5d2bb14426dc019 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 16 Apr 2026 15:09:28 +0100 Subject: [PATCH 4/4] fix --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1d35d92..61fa538 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - posthog-ruby (3.6.1) + posthog-ruby (3.6.2) concurrent-ruby (~> 1) GEM @@ -286,7 +286,7 @@ CHECKSUMS ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912 parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130 parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54 - posthog-ruby (3.6.1) + posthog-ruby (3.6.2) pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 prettier (4.0.4) sha256=713110c77675de802806b4e09b4b7783e497689db3e8a991f812aa78f4835bc5 prettier_print (1.2.1) sha256=a72838b5f23facff21f90a5423cdcdda19e4271092b41f4ea7f50b83929e6ff9