From b0676caa1ff6ceeb05bbd692f9dca708b4281687 Mon Sep 17 00:00:00 2001 From: Daniel Klimuntowski Date: Sun, 19 Apr 2026 23:05:24 +0200 Subject: [PATCH] ci: replace release-please with GitHub Actions-based Docker release workflow --- .github/workflows/release.yml | 54 ++++++++++++++++------------------- release-please-config.json | 12 -------- 2 files changed, 24 insertions(+), 42 deletions(-) delete mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71ea125..b9decfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,49 +2,40 @@ name: Release on: push: - branches: [main] + tags: + - "v*" -permissions: - contents: write - pull-requests: write - packages: write +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} jobs: - release-please: - name: Release Please + publish: runs-on: ubuntu-latest - outputs: - release_created: ${{ steps.release.outputs.release_created }} - tag_name: ${{ steps.release.outputs.tag_name }} - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - config-file: release-please-config.json - manifest-file: .release-please-manifest.json + permissions: + contents: write + packages: write - publish-docker: - name: Publish Docker image - needs: release-please - if: needs.release-please.outputs.release_created == 'true' - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/danielpmichalski/anki-cloud + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=${{ needs.release-please.outputs.tag_name }} - type=raw,value=latest - - name: Build and push + type=ref,event=tag + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . @@ -52,5 +43,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/release-please-config.json b/release-please-config.json deleted file mode 100644 index 4703298..0000000 --- a/release-please-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "release-type": "node", - "packages": { - ".": { - "changelog-path": "CHANGELOG.md", - "release-type": "node", - "bump-minor-pre-major": true, - "bump-patch-for-minor-pre-major": true - } - } -}