Modify: update actions (#398)

pull/427/head
hiCasper 5 years ago committed by GitHub
parent e038350cf0
commit a5000c0621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,8 +63,26 @@ jobs:
chmod +x ./build.sh
./build.sh -r b
- name: Upload binary files
uses: actions/upload-artifact@v1
- name: Upload binary files (windows_amd64)
uses: actions/upload-artifact@v2
with:
name: release
path: release/
name: cloudreve_windows_amd64
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.*

@ -55,7 +55,12 @@ _build() {
export CC=$gcc
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'"
if [ "$os" = "windows" ]; then

Loading…
Cancel
Save