Skip to content

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

Add github ci actions to build binaries and docker image

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

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
strategy:
matrix:
arch: [ "amd64", "arm64" ]
os: [ "linux", "darwin" ]
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: compile and release
run: |
mkdir target
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o 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 }}
asset_name: /podcast-sync-server-${{ matrix.os }}-${{ matrix.arch }}
tag: ${{ github.ref }}
overwrite: true
body: "Release ${{ github.ref }}"