Skip to content

Merge pull request #491 from cloudcloud/fix/disk-space #20

Merge pull request #491 from cloudcloud/fix/disk-space

Merge pull request #491 from cloudcloud/fix/disk-space #20

Workflow file for this run

name: release
on:
push:
tags:
- '*'
jobs:
build:
strategy:
matrix:
os: ['linux', 'darwin', 'windows']
permissions:
contents: write
runs-on: ubuntu-latest
name: 'Build All Artefacts'
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: 'Setup Go'
uses: actions/setup-go@v4
with:
go-version: ^1.22
- name: 'Setup Node'
uses: actions/setup-node@v4
with:
node-version: 20
- name: 'Build Frontend Artefacts'
run: yarn && NODE_OPTIONS=--openssl-legacy-provider yarn build
- name: 'Compile Binary'
run: mkdir bin && GOOS=${{ matrix.os }} GOARCH=amd64 go build -o bin/roadie-${{ matrix.os }}-amd64 ./cmd/roadie
- name: 'Archive Binary'
uses: actions/upload-artifact@v4
with:
name: binary-amd64-${{ matrix.os }}
path: bin/roadie-${{ matrix.os }}-amd64
# Could potentially use saadmk11/changelog-ci@v1.1.2 to automate the release body
- name: 'Create Github Release'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: 'bin/*'
omitBody: true
# The container image build doesn't depend on any steps outside the build process itself, run in parallel
container:
runs-on: ubuntu-latest
name: 'Build Container Image'
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: 'Setup Docker buildx'
uses: docker/setup-buildx-action@v3
- name: 'Login to Docker Hub'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: 'Extract Metadata'
id: meta
uses: docker/metadata-action@v5
with:
images: cloudcloud/roadie
- name: 'Build and Push Image'
uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}