Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel uploading the packages to the release assets #2568

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/actions/tagname-action/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Extract tag name

Extract tag name from release branch
Extract tag information from release branch

## Outputs

### `tag`

tag name

### `tagnum`

tag number

## Example usage

```yaml
- uses: ./.github/actions/tagname-action
id: tag

- name: Other step
run: echo ${{ steps.tag.outputs.tag }}
run: |
echo ${{ steps.tag.outputs.tag }}
echo ${{ steps.tag.outputs.tagnum }}
```
9 changes: 7 additions & 2 deletions .github/actions/tagname-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: 'Extract tag name'
description: 'Extract tag name'
name: 'Extract tag information'
description: 'Extract tag information'
outputs:
tag:
description: 'tag name'
value: ${{ steps.tag.outputs.tag }}
tagnum:
description: 'tag number'
value: ${{ steps.tag.outputs.tagnum }}
runs:
using: "composite"
steps:
- id: tag
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
tagnum=$(echo $tag |sed 's/^v//')
echo "::set-output name=tag::$tag"
echo "::set-output name=tagnum::$tagnum"
shell: bash
21 changes: 7 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,27 @@ jobs:
- centos8
container:
image: vesoft/nebula-dev:${{ matrix.os }}
env:
BUILD_DIR: ./pkg-build
CPACK_DIR: ./pkg-build/cpack_output
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/tagname-action
id: tag
- name: package
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }}
- name: output some vars
id: vars
env:
SHA_EXT: sha256sum.txt
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
filename=$(find pkg-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=subdir::$subdir"
- uses: ./.github/actions/upload-assets-action
with:
asset-path: pkg-build/cpack_output
tag: ${{ steps.tag.outputs.tag }}
tar zcf ${{ env.CPACK_DIR }}/nebula-${{ steps.tag.outputs.tagnum }}.tar.gz --exclude=${{ env.BUILD_DIR }} ./*
find ${{ env.CPACK_DIR }} -type f \( -iname \*.deb -o -iname \*.rpm \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \;
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: pkg-build/cpack_output
target-path: package/${{ steps.vars.outputs.subdir }}
asset-path: ${{ env.CPACK_DIR }}
target-path: package/${{ steps.tag.outputs.tagnum }}

docker_build:
name: docker-build
Expand Down