Skip to content
Merged
Changes from 1 commit
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
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release
Comment thread
ggallen marked this conversation as resolved.
Resolved

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
Comment thread
ggallen marked this conversation as resolved.
Resolved

permissions:
contents: write
Comment thread
ggallen marked this conversation as resolved.
Resolved

jobs:
release:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"

if gh release view "${TAG}" >/dev/null 2>&1; then
echo "Release ${TAG} already exists, skipping"
exit 0
fi

PRERELEASE=""
if [[ "${TAG}" == *-* ]]; then
PRERELEASE="--prerelease"
fi

gh release create "${TAG}" \
--title "${TAG}" \
Comment thread
ggallen marked this conversation as resolved.
Resolved
--notes "Synced with [fullsend ${TAG}](https://github.com/fullsend-ai/fullsend/releases/tag/${TAG})" \
${PRERELEASE}

- name: Move v0 floating tag
Comment thread
ggallen marked this conversation as resolved.
Resolved
if: "!contains(github.ref_name, '-')"
run: |
set -euo pipefail
CURRENT=""
if git rev-parse v0 >/dev/null 2>&1; then
CURRENT=$(git rev-parse v0)
Comment thread
ggallen marked this conversation as resolved.
Resolved
if ! git merge-base --is-ancestor "${CURRENT}" "${GITHUB_SHA}"; then
echo "::warning::v0 already points at a newer commit, skipping"
exit 0
fi
fi
git tag -f v0 "${GITHUB_SHA}"
if [[ -n "${CURRENT}" ]]; then
git push --force-with-lease="v0:${CURRENT}" origin v0
else
git push origin v0
fi
Comment thread
ggallen marked this conversation as resolved.
Resolved
Comment thread
ggallen marked this conversation as resolved.
Resolved
Loading