Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.1.1"
}
6 changes: 6 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"release-type": "go",
"package-name": "livekit-webhook-impulse",
"include-component-in-tag": false,
"extra-files": [
{
"type": "generic",
"path": "Impulse.yaml"
}
],
"changelog-sections": [
{
"type": "feat",
Expand Down
118 changes: 83 additions & 35 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag_name:
description: Existing release tag to publish (for example `v0.1.0`)
required: false
type: string

permissions:
contents: write
Expand All @@ -20,63 +26,105 @@ env:
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Release Please
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.tag_name == '' }}
id: release
uses: googleapis/release-please-action@v4
with:
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json

- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
- name: Checkout workflow source
uses: actions/checkout@v6

- name: Set up Go
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
cache: true
cache-dependency-path: go.sum

- name: Run lint and tests
if: ${{ steps.release.outputs.release_created }}
- name: Detect release context
id: publish
env:
GH_TOKEN: ${{ github.token }}
run: |
make lint
make test
set -euo pipefail

manual_tag="${{ github.event.inputs.tag_name }}"
if [ -n "${manual_tag}" ]; then
release_json="$(gh release view "${manual_tag}" --json targetCommitish,url 2>/dev/null || true)"
if [ -z "${release_json}" ]; then
echo "Release ${manual_tag} not found" >&2
exit 1
fi

echo "publish=true" >> "$GITHUB_OUTPUT"
echo "tag_name=${manual_tag}" >> "$GITHUB_OUTPUT"
echo "release_url=$(printf '%s' "${release_json}" | jq -r '.url')" >> "$GITHUB_OUTPUT"
echo "checkout_ref=${manual_tag}" >> "$GITHUB_OUTPUT"
exit 0
fi

if [ "${{ steps.release.outputs.release_created }}" = "true" ]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
echo "tag_name=${{ steps.release.outputs.tag_name }}" >> "$GITHUB_OUTPUT"
echo "release_url=${{ steps.release.outputs.html_url }}" >> "$GITHUB_OUTPUT"
echo "checkout_ref=${{ steps.release.outputs.tag_name }}" >> "$GITHUB_OUTPUT"
exit 0
fi

version="$(jq -r '."."' .github/.release-please-manifest.json)"
if [ -z "${version}" ] || [ "${version}" = "null" ]; then
echo "publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

tag_name="v${version}"
release_json="$(gh release view "${tag_name}" --json targetCommitish,url 2>/dev/null || true)"
if [ -z "${release_json}" ]; then
echo "publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

target_commitish="$(printf '%s' "${release_json}" | jq -r '.targetCommitish')"
if [ "${target_commitish}" != "${GITHUB_SHA}" ]; then
echo "publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "publish=true" >> "$GITHUB_OUTPUT"
echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT"
echo "release_url=$(printf '%s' "${release_json}" | jq -r '.url')" >> "$GITHUB_OUTPUT"
echo "checkout_ref=${tag_name}" >> "$GITHUB_OUTPUT"

- name: Checkout release source
if: ${{ steps.publish.outputs.publish == 'true' }}
uses: actions/checkout@v6
with:
ref: ${{ steps.publish.outputs.checkout_ref }}

- name: Set up Docker Buildx
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Container Registry
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.GHCR_IMAGE }}
tags: |
type=semver,pattern={{version}},value=${{ steps.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ steps.release.outputs.tag_name }}
type=raw,value=${{ steps.release.outputs.tag_name }}
type=semver,pattern={{version}},value=${{ steps.publish.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.publish.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ steps.publish.outputs.tag_name }}
type=raw,value=${{ steps.publish.outputs.tag_name }}
type=raw,value=latest

- name: Build and push Docker image
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
uses: docker/build-push-action@v7
with:
context: .
Expand All @@ -88,7 +136,7 @@ jobs:
cache-to: type=gha,mode=max

- name: Detect template manifest
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
id: template
run: |
set -euo pipefail
Expand All @@ -106,22 +154,22 @@ jobs:
echo "file=${template_file}" >> "$GITHUB_OUTPUT"
echo "kind=${template_kind}" >> "$GITHUB_OUTPUT"
echo "latest_url=https://github.com/${{ github.repository }}/releases/latest/download/${template_file}" >> "$GITHUB_OUTPUT"
echo "versioned_url=https://github.com/${{ github.repository }}/releases/download/${{ steps.release.outputs.tag_name }}/${template_file}" >> "$GITHUB_OUTPUT"
echo "versioned_url=https://github.com/${{ github.repository }}/releases/download/${{ steps.publish.outputs.tag_name }}/${template_file}" >> "$GITHUB_OUTPUT"

- name: Upload template manifest to GitHub release
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ steps.release.outputs.tag_name }}" "${{ steps.template.outputs.file }}" --clobber
run: gh release upload "${{ steps.publish.outputs.tag_name }}" "${{ steps.template.outputs.file }}" --clobber

- name: Summarize release
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.publish.outputs.publish == 'true' }}
run: |
{
echo "## Release ${{ steps.release.outputs.tag_name }} 🚀"
echo "## Release ${{ steps.publish.outputs.tag_name }} 🚀"
echo
echo "- **GitHub Release**: https://github.com/${{ github.repository }}/releases/tag/${{ steps.release.outputs.tag_name }}"
echo "- **Container Image**: \`${{ env.GHCR_IMAGE }}:${{ steps.release.outputs.tag_name }}\`"
echo "- **GitHub Release**: ${{ steps.publish.outputs.release_url }}"
echo "- **Container Image**: \`${{ env.GHCR_IMAGE }}:${{ steps.publish.outputs.tag_name }}\`"
echo "- **Template Kind**: \`${{ steps.template.outputs.kind }}\`"
echo "- **Latest Template URL**: ${{ steps.template.outputs.latest_url }}"
echo "- **Pinned Template URL**: ${{ steps.template.outputs.versioned_url }}"
Expand All @@ -133,6 +181,6 @@ jobs:
echo
echo "### Pull the image"
echo '```bash'
echo "docker pull ${{ env.GHCR_IMAGE }}:${{ steps.release.outputs.tag_name }}"
echo "docker pull ${{ env.GHCR_IMAGE }}:${{ steps.publish.outputs.tag_name }}"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ This file is automatically generated by [Release Please](https://github.com/goog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1](https://github.com/bubustack/livekit-webhook-impulse/compare/v0.1.0...v0.1.1) (2026-04-18)


### Miscellaneous

* harden release automation ([4320f5c](https://github.com/bubustack/livekit-webhook-impulse/commit/4320f5ca369840c55c336b6fe5b5a81d4231a932))

## 0.1.0 (2026-04-18)


Expand Down
4 changes: 2 additions & 2 deletions Impulse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
annotations:
registry.bubustack.io/maturity: experimental
spec:
version: 0.1.0
version: 0.1.1 # x-release-please-version
description: An Impulse that listens for LiveKit webhook events and triggers a StoryRun.
image: ghcr.io/bubustack/livekit-webhook-impulse:0.1.0
image: ghcr.io/bubustack/livekit-webhook-impulse:0.1.1 # x-release-please-version
supportedModes:
- deployment
configSchema:
Expand Down
Loading