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
41 changes: 41 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Prepare release
on:
workflow_dispatch:
inputs:
version:
description: New version without v prefix (e.g. 0.1.0)
required: true
type: string
base_sha:
description: Expected HEAD SHA of main
required: true
type: string
concurrency:
group: release-docker-apps
jobs:
prepare:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: rubykatzen/releaser/.github/actions/verify-release@v0.4.1
with:
base_sha: ${{ inputs.base_sha }}
- uses: rubykatzen/releaser/.github/actions/generate-notes@v0.4.1
id: notes
with:
version: ${{ inputs.version }}
- uses: rubykatzen/releaser/.github/actions/prepare-release-branch@v0.4.1
with:
version: ${{ inputs.version }}
- uses: rubykatzen/releaser/.github/actions/update-changelog@v0.4.1
with:
version: ${{ inputs.version }}
notes: ${{ steps.notes.outputs.notes }}
- uses: rubykatzen/releaser/.github/actions/push-release-branch@v0.4.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Open the release PR before finishing prepare

🤖 [rubykatzen/docker-apps]: This is the final step of the prepare workflow, and it only pushes release/v${version}; the new publish workflow runs only when a PR into main is closed. A workflow_dispatch run therefore leaves the release process stalled unless someone manually creates the PR, contrary to the intended prepare → merge PR → publish flow; add a PR creation step/permission here or document and automate the manual handoff elsewhere.

Useful? React with 👍 / 👎.

with:
version: ${{ inputs.version }}
55 changes: 55 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
publish:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.meta.outputs.version }}
steps:
- uses: actions/checkout@v7
with:
ref: main

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tag the merged release commit, not moving main

🤖 [rubykatzen/docker-apps]: In the inspected .github/workflows/publish-release.yml, checking out ref: main means the tag and docker-apps.zip are built from whatever main points to when this job starts. If another PR lands after the release PR is merged but before this workflow reaches checkout, the release tag will include unrelated post-release changes while the release notes still come from the release branch/version; use the pull request merge SHA or the event SHA instead of the moving branch ref.

Useful? React with 👍 / 👎.

fetch-depth: 0
- uses: rubykatzen/releaser/.github/actions/read-release-data@v0.4.1
id: meta
with:
branch: ${{ github.event.pull_request.head.ref }}
- uses: rubykatzen/releaser/.github/actions/create-release@v0.4.1
with:
version: ${{ steps.meta.outputs.version }}
notes: ${{ steps.meta.outputs.notes }}
upload:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
ref: v${{ needs.publish.outputs.version }}
- id: bundle
uses: ./.github/actions/build-bundle
with:
bundle-name: docker-apps.zip
paths: |
apps
ansible.cfg
.env.example
backup.sh
deploy.sh
down.sh
generate-env.sh
lib.sh
logs.sh
restart.sh
up.sh
README.md
- run: gh release upload "v${{ needs.publish.outputs.version }}" "${{ steps.bundle.outputs.bundle-path }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 changes: 0 additions & 68 deletions .github/workflows/release.yml

This file was deleted.