mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Build binary artifacts
This commit is contained in:
parent
b8a3af090d
commit
a756751cc6
2 changed files with 53 additions and 12 deletions
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
|
@ -1,5 +1,10 @@
|
||||||
name: Build
|
name: Build
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
go:
|
go:
|
||||||
name: Test Server on ${{ matrix.os }}
|
name: Test Server on ${{ matrix.os }}
|
||||||
|
@ -38,7 +43,6 @@ jobs:
|
||||||
js:
|
js:
|
||||||
name: Test UI
|
name: Test UI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
|
@ -68,3 +72,40 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd ui
|
cd ui
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: js-bundle
|
||||||
|
path: ui/build
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build snapshot binaries
|
||||||
|
if: github.event.pull_request.merged || github.event_name == 'push'
|
||||||
|
needs: [js]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Fetch tags
|
||||||
|
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: js-bundle
|
||||||
|
path: ui/build
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: docker://deluan/ci-goreleaser:1.14.1-1
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: goreleaser release --rm-dist --skip-publish --snapshot
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: binaries
|
||||||
|
path: dist
|
||||||
|
|
|
@ -17,7 +17,7 @@ builds:
|
||||||
flags:
|
flags:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_linux_amd64
|
- id: navidrome_linux_amd64
|
||||||
env:
|
env:
|
||||||
|
@ -30,7 +30,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_linux_musl_amd64
|
- id: navidrome_linux_musl_amd64
|
||||||
env:
|
env:
|
||||||
|
@ -44,7 +44,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_linux_arm
|
- id: navidrome_linux_arm
|
||||||
env:
|
env:
|
||||||
|
@ -61,7 +61,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_linux_arm64
|
- id: navidrome_linux_arm64
|
||||||
env:
|
env:
|
||||||
|
@ -75,7 +75,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_windows_i686
|
- id: navidrome_windows_i686
|
||||||
env:
|
env:
|
||||||
|
@ -90,7 +90,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
- id: navidrome_windows_x64
|
- id: navidrome_windows_x64
|
||||||
env:
|
env:
|
||||||
|
@ -105,7 +105,7 @@ builds:
|
||||||
- -tags=embed
|
- -tags=embed
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-extldflags '-static'"
|
- "-extldflags '-static'"
|
||||||
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Tag}}
|
- -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}}
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- id: musl
|
- id: musl
|
||||||
|
@ -134,10 +134,10 @@ archives:
|
||||||
amd64: x86_64
|
amd64: x86_64
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: '{{ .ProjectName }}_checksums.txt'
|
name_template: "{{ .ProjectName }}_checksums.txt"
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ .Tag }}-next"
|
name_template: "{{ .Tag }}-SNAPSHOT"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
draft: true
|
draft: true
|
||||||
|
@ -146,4 +146,4 @@ changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
filters:
|
filters:
|
||||||
exclude:
|
exclude:
|
||||||
- '^docs:'
|
- "^docs:"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue