mirror of https://github.com/synctv-org/synctv
feat: release ci
parent
eeffe049cf
commit
083aedae12
@ -1,82 +0,0 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
build-targets:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
targets:
|
||||
- Target: linux/386
|
||||
- Target: linux/amd64
|
||||
- Target: linux/arm
|
||||
- Target: linux/arm64
|
||||
- Target: linux/loong64
|
||||
- Target: linux/ppc64le
|
||||
- Target: linux/riscv64
|
||||
- Target: linux/s390x
|
||||
- Target: linux/mips
|
||||
CGO: true
|
||||
- Target: linux/mips64
|
||||
CGO: true
|
||||
- Target: linux/mips64le
|
||||
CGO: true
|
||||
- Target: linux/mipsle
|
||||
CGO: true
|
||||
- Target: darwin/amd64
|
||||
- Target: darwin/arm64
|
||||
- Target: windows/386
|
||||
- Target: windows/amd64
|
||||
- Target: windows/arm64
|
||||
- Target: freebsd/386
|
||||
- Target: freebsd/amd64
|
||||
- Target: freebsd/arm
|
||||
- Target: freebsd/arm64
|
||||
- Target: openbsd/amd64
|
||||
- Target: openbsd/arm64
|
||||
- Target: netbsd/amd64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
|
||||
- name: Build targets
|
||||
uses: zijiren233/go-build-action@v1
|
||||
env:
|
||||
SUBMICRO_ARM_DISABLED: true
|
||||
MICRO_ARM64_DISABLED: true
|
||||
with:
|
||||
targets: ${{ matrix.targets.Target }}
|
||||
cgo-enabled: ${{ matrix.targets.CGO }}
|
||||
enable-micro: true
|
||||
config-args: --skip-init-web
|
||||
|
||||
- name: Get artifact name
|
||||
id: get_artifact_name
|
||||
run: |
|
||||
echo "ARTIFACT_NAME=$(echo ${{ matrix.targets.Target }} | tr ':' '-' | tr '/' '-')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.get_artifact_name.outputs.ARTIFACT_NAME }}
|
||||
path: build/*
|
@ -1,74 +0,0 @@
|
||||
name: release_dev
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release_dev:
|
||||
name: Release dev
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
targets:
|
||||
- Target: linux/386
|
||||
- Target: linux/amd64
|
||||
- Target: linux/arm
|
||||
- Target: linux/arm64
|
||||
- Target: linux/loong64
|
||||
- Target: linux/ppc64le
|
||||
- Target: linux/riscv64
|
||||
- Target: linux/s390x
|
||||
- Target: linux/mips
|
||||
CGO: true
|
||||
- Target: linux/mips64
|
||||
CGO: true
|
||||
- Target: linux/mips64le
|
||||
CGO: true
|
||||
- Target: linux/mipsle
|
||||
CGO: true
|
||||
- Target: darwin/amd64
|
||||
- Target: darwin/arm64
|
||||
- Target: windows/386
|
||||
- Target: windows/amd64
|
||||
- Target: windows/arm64
|
||||
- Target: freebsd/386
|
||||
- Target: freebsd/amd64
|
||||
- Target: freebsd/arm
|
||||
- Target: freebsd/arm64
|
||||
- Target: openbsd/amd64
|
||||
- Target: openbsd/arm64
|
||||
- Target: netbsd/amd64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
|
||||
- name: Build targets
|
||||
uses: zijiren233/go-build-action@v1
|
||||
env:
|
||||
SUBMICRO_ARM_DISABLED: true
|
||||
MICRO_ARM64_DISABLED: true
|
||||
with:
|
||||
targets: ${{ matrix.targets.Target }}
|
||||
cgo-enabled: ${{ matrix.targets.CGO }}
|
||||
enable-micro: true
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
draft: false
|
||||
prerelease: true
|
||||
append_body: false
|
||||
fail_on_unmatched_files: true
|
||||
name: "Dev Build"
|
||||
tag_name: dev
|
||||
files: |
|
||||
build/*
|
@ -1,53 +0,0 @@
|
||||
name: release_docker
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release_docker:
|
||||
name: Release Docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: synctvorg/synctv
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
build-args:
|
||||
VERSION=v${{ steps.get_version.outputs.VERSION }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
@ -1,3 +1,6 @@
|
||||
[submodule "vendors"]
|
||||
path = vendors
|
||||
url = https://github.com/synctv-org/vendors
|
||||
[submodule "synctv-web"]
|
||||
path = synctv-web
|
||||
url = https://github.com/synctv-org/synctv-web
|
||||
|
@ -0,0 +1 @@
|
||||
Subproject commit f0866f78518cb2321665742c81bea71ae49ea3da
|
Loading…
Reference in New Issue