mirror of
https://github.com/criyle/go-judge.git
synced 2025-11-04 14:50:02 +08:00
build(ci): upload individual artifacts
This commit is contained in:
parent
17878d722f
commit
08dd4d99f5
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@ -14,8 +14,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Fetch all tags
|
|
||||||
run: git fetch --force --tags
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@ -50,4 +48,33 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: go-judge
|
name: go-judge
|
||||||
path: dist/*
|
path: dist/
|
||||||
|
upload-artifacts:
|
||||||
|
name: Upload artifacts-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
arch:
|
||||||
|
- amd64_v3
|
||||||
|
- arm64_v8.0
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: go-judge
|
||||||
|
path: dist
|
||||||
|
- name: Upload assets go-judge
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: go-judge_${{ matrix.os == 'darwin' && 'macos' || matrix.os }}_${{ matrix.arch }}
|
||||||
|
path: dist/go-judge_${{ matrix.os }}_${{ matrix.arch }}/go-judge${{ matrix.os == 'windows' && '.exe'}}
|
||||||
|
- name: Upload assets go-judge-shell
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: go-judge-shell_${{ matrix.os == 'darwin' && 'macos' || matrix.os }}_${{ matrix.arch }}
|
||||||
|
path: dist/go-judge-shell_${{ matrix.os }}_${{ matrix.arch }}/go-judge-shell${{ matrix.os == 'windows' && '.exe'}}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ archives:
|
|||||||
- mount.yaml
|
- mount.yaml
|
||||||
formats: [ 'binary', 'tar.gz' ]
|
formats: [ 'binary', 'tar.gz' ]
|
||||||
name_template: >-
|
name_template: >-
|
||||||
{{ .ProjectName }}_{{ .Version }}_
|
{{ .Binary }}_{{ .Version }}_
|
||||||
{{- if eq .Os "darwin" }}macOS
|
{{- if eq .Os "darwin" }}macOS
|
||||||
{{- else }}{{ .Os }}{{ end }}_{{ .Arch }}
|
{{- else }}{{ .Os }}{{ end }}_{{ .Arch }}
|
||||||
{{- with .Arm }}v{{ . }}{{ end }}
|
{{- with .Arm }}v{{ . }}{{ end }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user