Skip to content

Merge branch 'main' of /~https://github.com/ensingerphilipp/Premiumizea… #23

Merge branch 'main' of /~https://github.com/ensingerphilipp/Premiumizea…

Merge branch 'main' of /~https://github.com/ensingerphilipp/Premiumizea… #23

Workflow file for this run

name: Build
on:
push:
tags:
- 'v*'
pull_request:
branches: [ main ]
permissions:
contents: write
packages: write
attestations: write
id-token: write
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: '1.23'
- name: go Version
run: go version
- name: Docker Version
run: docker version
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# Standard Build
- name: Build
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/') == false
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
- uses: docker/login-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Release build
- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
# Pre-Release build
- name: Pre-Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-rc')
with:
distribution: goreleaser
version: latest
args: release --clean -f .prerelease.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/