Skip to content

Initial commit

Initial commit #2

Workflow file for this run

name: Release
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
build:
name: Build caddy
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
go: [~1.22.1]
uses: ./.github/workflows/build.yml
with:
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
go: ${{ matrix.go }}
docker:
name: Build docker image
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/download-artifact@v4
with:
name: caddy-linux-amd64
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
flavor: |
latest=true
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
release:
name: Create release notes
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
pattern: caddy-*
merge-multiple: true
- name: Create release notes
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "caddy-*"
prerelease: true