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
25 changes: 25 additions & 0 deletions .github/workflows/dispatch-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Dispatch Publish Release
permissions:
actions: write
contents: read

on:
push:
tags:
- "v*"

jobs:
dispatch:
if: github.repository == 'openai/openai-cli'
runs-on: ubuntu-latest
steps:
- name: Dispatch Publish Release on main
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
gh workflow run publish-release.yml \
--repo "$GITHUB_REPOSITORY" \
--ref main \
-f tag="$TAG"
37 changes: 33 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ concurrency:
group: publish

on:
push:
tags:
- "v*"
workflow_dispatch: {}
workflow_dispatch:
inputs:
tag:
description: "Release tag to publish, for example v1.2.3"
required: true
type: string
jobs:
goreleaser:
if: github.repository == 'openai/openai-cli'
runs-on: ubuntu-latest
environment: publish
permissions:
Expand All @@ -25,6 +28,31 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Ensure release tag is on main
env:
TAG: ${{ inputs.tag }}
run: |
case "$TAG" in
v*) ;;
*) echo "Release tag must start with v: $TAG"; exit 1 ;;
esac
git check-ref-format "refs/tags/$TAG"

remote_tag="$(git ls-remote --exit-code --tags --refs origin "refs/tags/$TAG")"
remote_ref="$(printf '%s\n' "$remote_tag" | awk '{print $2}')"
test "$remote_ref" = "refs/tags/$TAG"

git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
git fetch --no-tags origin "+refs/tags/$TAG:refs/tags/$TAG"

local_ref="$(git for-each-ref --format='%(refname)' "refs/tags/$TAG")"
test "$local_ref" = "refs/tags/$TAG"

tag_sha="$(git rev-parse "refs/tags/$TAG^{commit}")"
echo "Release tag $TAG resolves to $tag_sha"
git merge-base --is-ancestor "$tag_sha" origin/main
git checkout --detach "$tag_sha"
test "$(git rev-parse HEAD)" = "$tag_sha"
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
Expand Down Expand Up @@ -57,6 +85,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.tap-token.outputs.token }}
GORELEASER_CURRENT_TAG: ${{ inputs.tag }}
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.1.0"
".": "1.1.1"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.1 (2026-05-07)

Full Changelog: [v1.1.0...v1.1.1](https://github.com/openai/openai-cli/compare/v1.1.0...v1.1.1)

## 1.1.0 (2026-05-07)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/openai/openai-cli/compare/v1.0.0...v1.1.0)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package cmd

const Version = "1.1.0" // x-release-please-version
const Version = "1.1.1" // x-release-please-version
Loading