Skip to content

Commit

Permalink
Trigger release workflow manually (vesoft-inc#760)
Browse files Browse the repository at this point in the history
<!--
Thanks for your contribution!
In order to review PR more efficiently, please add information according to the template.
-->

## What type of PR is this?
- [ ] bug
- [ ] feature
- [X] enhancement

## What problem(s) does this PR solve?
#### Issue(s) number: 

close vesoft-inc#3815 

#### Description:

when releasing a nebula PATCH version(z version of x.y.z), create git tag on one same branch rather than a new branch, such as:

```text
release-3.2   -----+----------+------- branch
                    \          \
                    v3.2.0    v3.2.1   tag
```


## How do you solve it?

use github action manual trigger to package rc version.



## Special notes for your reviewer, ex. impact of this fix, design document, etc:



## Checklist:
Tests:
- [ ] Unit test(positive and negative cases)
- [ ] Function test
- [ ] Performance test
- [X] N/A

Affects:
- [ ] Documentation affected (Please add the label if documentation needs to be modified.)
- [ ] Incompatibility (If it breaks the compatibility, please describe it and add the label.)
- [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
- [ ] Performance impacted: Consumes more CPU/Memory


## Release notes:
None

Please confirm whether to be reflected in release notes and how to describe:
> ex. Fixed the bug .....
None


Migrated from vesoft-inc#4105

Co-authored-by: Yee <[email protected]>
  • Loading branch information
nebula-bots and yixinglu authored Apr 1, 2022
1 parent 79a9789 commit cfcdbae
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
14 changes: 7 additions & 7 deletions .github/actions/tagname-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: 'Extract tag information'
description: 'Extract tag information'
name: "Extract tag information"
description: "Extract tag information"
outputs:
tag:
description: 'tag name'
description: "tag name"
value: ${{ steps.tag.outputs.tag }}
tagnum:
description: 'tag number'
description: "tag number"
value: ${{ steps.tag.outputs.tagnum }}
majorver:
description: 'major version'
description: "major version"
value: ${{ steps.tag.outputs.majorver }}
runs:
using: "composite"
steps:
- id: tag
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
tagnum=$(echo $tag | sed 's/^v//')
majorver=$(echo $tag | cut -d '.' -f 1)
tagnum=$(echo $tag | sed "s/^v//")
majorver=$(echo $tag | cut -d "." -f 1)
echo "::set-output name=tag::$tag"
echo "::set-output name=tagnum::$tagnum"
echo "::set-output name=majorver::$majorver"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
find pkg-build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm -o -iname \*.tar.gz \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \;
subdir=$(date -u +%Y.%m.%d)
echo "::set-output name=subdir::$subdir"
- uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}-nightly
path: pkg-build/cpack_output
# - uses: actions/upload-artifact@v1
# with:
# name: ${{ matrix.os }}-nightly
# path: pkg-build/cpack_output
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [synchronize, reopened, labeled]
branches:
- master
- 'v[0-9]+.*'
- 'release-**'

concurrency:
group: ${{ github.head_ref }}
Expand Down Expand Up @@ -190,11 +190,11 @@ jobs:
working-directory: tests/
timeout-minutes: 2
# - name: coverage
# if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
# if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }}
# run: |
# ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include --exclude=/opt/vesoft --exclude scanner.lex
# - uses: codecov/codecov-action@v2
# if: ${{ matrix.compiler == 'gcc-9.2' && matrix.os == 'ubuntu2004' }}
# if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }}
# with:
# files: fastcov.info
# fail_ci_if_error: false
Expand Down Expand Up @@ -237,7 +237,6 @@ jobs:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- name: Prepare environment
id: prepare
run: |
[ -d build/ ] && rm -rf build/* || mkdir -p build
make init -C tests
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: rc

on:
push:
branches:
- 'v[0-9]+.*'
workflow_dispatch:
inputs:
version:
description: "version such as '3.1.0'"
required: true

concurrency:
group: rc
Expand Down Expand Up @@ -43,8 +45,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '^1.16.7'
- uses: ./.github/actions/tagname-action
id: tag
- id: tag
run: echo ::set-output name=tagnum::${{ github.event.inputs.version }}
- name: package
run: ./package/package.sh -v ${{ steps.tag.outputs.tagnum }}-ent -t RelWithDebInfo -r OFF -p ON -s TRUE -k ON
- name: output some vars
Expand Down Expand Up @@ -85,8 +87,11 @@ jobs:
with:
run: sh -c "find . -mindepth 1 -delete"
- uses: actions/checkout@v2
- uses: ./.github/actions/tagname-action
id: tagname
- id: tagname
run: |
echo ::set-output name=tag::"v${{ github.event.inputs.version }}"
echo ::set-output name=tagnum::"${{ github.event.inputs.version }}"
echo ::set-output name=majorver::"v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')"
- id: docker
run: |
majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".")
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ modules/

# tests
!tests/Makefile
tests/secrets
reformat-gherkin
nebula-python

Expand Down

0 comments on commit cfcdbae

Please sign in to comment.