Skip to content

Build & Release

Build & Release #7

Workflow file for this run

name: 'Build & Release'
on:
create:
tags:
- v*
permissions:
contents: 'write'
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- name: 'Clone the repository'
uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: 'Set up Docker Buildx'
uses: 'docker/setup-buildx-action@v3'
- name: 'Build Docker Image'
run: |
docker buildx build \
-f docker/prod/Dockerfile \
--build-arg PARTYHALL_VERSION="${GITHUB_REF##*/}" \
--build-arg PARTYHALL_COMMIT="${GITHUB_SHA}" \
-t partyhall:latest \
--load \
.
- name: 'Extract binaries'
run: |
docker run \
--rm \
-v ${{ github.workspace }}:/binaries \
partyhall:latest \
/bin/sh -c 'cp /partyhall-${{ github.ref_name }}-linux-* /binaries/'
- uses: 'ncipollo/release-action@v1'
with:
artifacts: 'partyhall-*-*-*'
token: '${{ secrets.GITHUB_TOKEN }}'