Skip to content
Snippets Groups Projects
Unverified Commit 4a1d4b5b authored by jie.wang's avatar jie.wang Committed by GitHub
Browse files

upload package to artifact and OSS nightly (#788)


* upload package nightly

* use upload-to-oss action

Co-authored-by: default avatarYee <2520865+yixinglu@users.noreply.github.com>
parent 408db1a1
No related branches found
No related tags found
No related merge requests found
name: package
on:
schedule:
- cron: '0 18 * * *'
defaults:
run:
shell: bash
jobs:
package:
name: build package
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu1604
- ubuntu1804
- ubuntu2004
- centos6
- centos7
- centos8
container:
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: package
run: ./package/package.sh
- name: output some vars
id: vars
run: |
filename=$(find build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm \))
sha256sum $filename > $filename.$SHA_EXT
subdir = $(date -u +%Y.%m.%d)
echo "::set-output name=filepath::$filename"
echo "::set-output name=shafilepath::$filename.$SHA_EXT"
echo "::set-output name=subdir::$subdir"
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-v2-nightly
path: build/cpack_output
- name: upload package to oss
uses: tvrcgo/upload-to-oss@v0.1.1
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: build/cpack_output
target-path: /package/nightly/{{ steps.vars.outputs.subdir }}
......@@ -11,7 +11,7 @@ defaults:
jobs:
package:
name: package
name: build package
runs-on: ubuntu-latest
strategy:
fail-fast: false
......@@ -31,14 +31,29 @@ jobs:
id: tag
- name: package
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }}
- name: Get package name
id: pkg
- name: output some vars
id: vars
run: |
echo "::set-output name=filepath::$(find build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm \))"
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
filename=$(find build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm \))
sha256sum $filename > $filename.$SHA_EXT
subdir = $(echo $tag |sed 's/^v//')
echo "::set-output name=filepath::$filename"
echo "::set-output name=shafilepath::$filename.$SHA_EXT"
echo "::set-output name=subdir::$subdir"
- uses: ./.github/actions/upload-assets-action
with:
file-path: ${{ steps.pkg.outputs.filepath }}
tag: ${{ steps.tag.outputs.tag }}
file-path: ${{ steps.vars.outputs.filepath }}
tag: ${{ steps.tag.outputs.tag }}
- name: upload package to oss
uses: tvrcgo/upload-to-oss@v0.1.1
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: build/cpack_output
target-path: /package/{{ steps.vars.outputs.subdir }}
docker_build_graph:
name: docker-graph
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment