Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 9f01a04

Browse files
authored
feat: Switch from release-please to auto-release (#65)
Replace release-please with the auto-release pattern used by other CLIs: - Add auto-release.yml to create tags automatically on push to main - Add version.txt for base version (starting at 0.9) - Remove release-please.yml and config files - Update .goreleaser.yml to push to open-cli-collective/homebrew-tap - Standardize secret name to TAP_GITHUB_TOKEN
1 parent eccc13e commit 9f01a04

7 files changed

Lines changed: 43 additions & 35 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Auto Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
# Skip if commit is from the release workflow (avoid loops)
15+
if: "!startsWith(github.event.head_commit.message, 'chore:') && !startsWith(github.event.head_commit.message, 'chore(')"
16+
steps:
17+
# TAP_GITHUB_TOKEN (a PAT) is required here instead of the default GITHUB_TOKEN
18+
# because tag pushes made with GITHUB_TOKEN do not trigger other workflows.
19+
# Without this, the Release workflow would not run when we push the tag.
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.TAP_GITHUB_TOKEN }}
24+
25+
- name: Read version
26+
id: version
27+
run: |
28+
BASE_VERSION=$(cat version.txt | tr -d '\n')
29+
VERSION="v${BASE_VERSION}.${GITHUB_RUN_NUMBER}"
30+
echo "version=$VERSION" >> $GITHUB_OUTPUT
31+
echo "Creating release: $VERSION"
32+
33+
- name: Create and push tag
34+
run: |
35+
git config user.name "github-actions[bot]"
36+
git config user.email "github-actions[bot]@users.noreply.github.com"
37+
git tag ${{ steps.version.outputs.version }}
38+
git push origin ${{ steps.version.outputs.version }}

.github/workflows/release-please.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
args: release --clean
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
30+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ archives:
4646
homebrew_casks:
4747
- name: cfl
4848
repository:
49-
owner: rianjs
50-
name: homebrew-confluence-cli
51-
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
49+
owner: open-cli-collective
50+
name: homebrew-tap
51+
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
5252
homepage: https://github.com/open-cli-collective/confluence-cli
5353
description: "Command-line interface for Atlassian Confluence"
5454
binary: cfl

.release-please-manifest.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

release-please-config.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.9

0 commit comments

Comments
 (0)