Skip to content

Commit

Permalink
Modify: update actions (cloudreve#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
hicasper authored May 20, 2020
1 parent e038350 commit a5000c0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5000c0

Please sign in to comment.