Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdstyle committed Sep 29, 2024
1 parent 65431e7 commit f8af15a
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions .github/workflows/release_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,46 @@ name: Release Binaries

on:
push:
paths-ignore:
- '**.md'
- 'Makefile'
- 'config.json'
tags:
- '*'

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
env:
CGO_CFLAGS_ALLOW: -Xpreprocessor
strategy:
matrix:
os: [ubuntu-latest, macOS-10.15]

name: Create Release
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.23
- name: Checkout code
uses: actions/checkout@v4

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Install linux deps
if: matrix.os == 'ubuntu-latest'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Binary (amd64)
run: |
sudo apt install libvips
docker run --rm -w /app -v "$(pwd)":/app webpsh/libvips make
sudo chown -R $USER:$USER builds/
sha256sum builds/pixfolio-linux-amd64 > builds/pixfolio-linux-amd64.sha256
- name: Install macos deps
if: matrix.os == 'macos-10.15'
- name: Build Binary (arm64)
run: |
brew install vips
docker run --rm -w /app -v "$(pwd)":/app --platform linux/arm64 webpsh/libvips make
sudo chown -R $USER:$USER builds/
sha256sum builds/pixfolio-linux-arm64 > builds/pixfolio-linux-arm64.sha256
- name: Get dependencies
- name: Check for ldd version(AMD64 only)
run: |
go get -v -t -d ./...
ldd builds/pixfolio-linux-amd64
- name: Build
run: go build -o pixfolio .
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
title: "Pixfolio"
files: |
builds/pixfolio-linux-amd64
builds/pixfolio-linux-amd64.sha256
builds/pixfolio-linux-arm64
builds/pixfolio-linux-arm64.sha256

0 comments on commit f8af15a

Please sign in to comment.