diff --git a/.github/workflows/release_binary.yaml b/.github/workflows/release_binary.yaml index 4490b65..d578cfb 100644 --- a/.github/workflows/release_binary.yaml +++ b/.github/workflows/release_binary.yaml @@ -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 \ No newline at end of file