Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build Docker image
run: |
docker build -t play-timer:latest .

- name: Extract binary
run: |
docker create --name extract play-timer:latest
docker cp extract:/app/.bin/play-timer play-timer-x86_64
docker rm extract

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: play-timer-x86_64
path: play-timer-x86_64
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM archlinux:latest
WORKDIR /app

RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm go meson ninja glib2 gtk3 gtk4 libadwaita wayland alsa-lib pulse-native-provider gobject-introspection graphene gcc pkgconf

COPY cmd ./cmd
COPY internal ./internal
COPY misc ./misc
COPY go.* *.go default.pgo ./

ENV GO111MODULE=on
ENV CGO_ENABLED=1

RUN mkdir -p .bin
RUN go mod download
RUN go build -pgo default.pgo -tags wayland -trimpath -ldflags="-s -w" -o .bin/play-timer ./cmd/main.go
Loading