Modify: update actions (#398)
This commit is contained in:
parent
e038350cf0
commit
a5000c0621
2 changed files with 28 additions and 5 deletions
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
|
@ -63,8 +63,26 @@ jobs:
|
||||||
chmod +x ./build.sh
|
chmod +x ./build.sh
|
||||||
./build.sh -r b
|
./build.sh -r b
|
||||||
|
|
||||||
- name: Upload binary files
|
- name: Upload binary files (windows_amd64)
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: release
|
name: cloudreve_windows_amd64
|
||||||
path: release/
|
path: release/cloudreve*windows_amd64.*
|
||||||
|
|
||||||
|
- name: Upload binary files (linux_amd64)
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: cloudreve_linux_amd64
|
||||||
|
path: release/cloudreve*linux_amd64.*
|
||||||
|
|
||||||
|
- name: Upload binary files (linux_arm)
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: cloudreve_linux_arm
|
||||||
|
path: release/cloudreve*linux_arm.*
|
||||||
|
|
||||||
|
- name: Upload binary files (linux_arm64)
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: cloudreve_linux_arm64
|
||||||
|
path: release/cloudreve*linux_arm64.*
|
||||||
|
|
7
build.sh
7
build.sh
|
@ -55,7 +55,12 @@ _build() {
|
||||||
export CC=$gcc
|
export CC=$gcc
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
|
||||||
out="release/cloudreve_${VERSION}_${os}_${arch}"
|
if [ -n "$VERSION" ]; then
|
||||||
|
out="release/cloudreve_${VERSION}_${os}_${arch}"
|
||||||
|
else
|
||||||
|
out="release/cloudreve_${COMMIT_SHA}_${os}_${arch}"
|
||||||
|
fi
|
||||||
|
|
||||||
go build -a -o "${out}" -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'"
|
go build -a -o "${out}" -ldflags " -X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=$VERSION' -X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=$COMMIT_SHA'"
|
||||||
|
|
||||||
if [ "$os" = "windows" ]; then
|
if [ "$os" = "windows" ]; then
|
||||||
|
|
Loading…
Reference in a new issue