Skip to content

Merge pull request #24 from waldner/main #14

Merge pull request #24 from waldner/main

Merge pull request #24 from waldner/main #14

Workflow file for this run

name: Create and publish a Docker image
on:
push:
paths-ignore:
- ".gitignore"
- "README.md"
- "LICENSE"
- "docs"
- "Makefile"
branches:
- "main"
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
packages: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- id: release-please
name: Release Please
uses: google-github-actions/release-please-action@v3
with:
release-type: go
package-name: authex
changelog-types: >-
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":true}
]
- name: Checkout
uses: actions/checkout@v3
if: steps.release-please.outputs.release_created
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
if: steps.release-please.outputs.release_created
with:
go-version-file: go.mod
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
if: steps.release-please.outputs.release_created
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
if: steps.release-please.outputs.release_created
- name: Log in to the Container registry
uses: docker/login-action@v2
if: steps.release-please.outputs.release_created
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
if: steps.release-please.outputs.release_created
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: steps.release-please.outputs.release_created
with:
args: release --clean --config .github/.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ORG : ${{ github.repository_owner }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}