Skip to content

Add github ci actions to build binaries and docker image #10

Add github ci actions to build binaries and docker image

Add github ci actions to build binaries and docker image #10

Workflow file for this run

on:
push:
tags:
- 'v*'
name: Build Binary Release
jobs:
build:
name: build binary for ${{ matrix.os }}/${{ matrix.arch }}
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
arch: [ "amd64", "arm64" ]
os: [ "linux", "darwin" ]
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: compile and release
run: |
mkdir -p target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}/
cp LICENSE target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}/
tar -czf target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}.tar.gz target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}/
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
overwrite: true
body: "Release ${{ env.GITHUB_REF }}"