Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/fuzzy-stars-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'posthog-ruby': patch
---

Simplify Ruby release token usage to retry the automated release flow.
24 changes: 11 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -193,19 +201,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: |
Expand Down Expand Up @@ -242,17 +242,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" \
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
posthog-ruby (3.6.1)
posthog-ruby (3.6.2)
concurrent-ruby (~> 1)

GEM
Expand Down Expand Up @@ -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
Expand Down
Loading