Skip to content
Snippets Groups Projects
Commit 8e4a3d34 authored by Xiao Gui's avatar Xiao Gui
Browse files

add release ci

parent 5edafcbc
No related branches found
No related tags found
No related merge requests found
name: Release CI
on:
pull_requests:
branches:
- master
jobs:
check_version:
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
MASTER_VERSION=$(git show origin/master:package.json | jq '.version')
THIS_VERSION=$(jq '.version' < package.json)
test "$MASTER_VERSION" == "$THIS_VERSION" && exit 1 || exit 0
check_release:
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
VERSION_NUM=$(jq '.version' < package.json)
VERSION_NUM=${VERSION_NUM#\"}
VERSION_NUM=${VERSION_NUM%\"}
test -f docs/releases/v$VERSION_NUM.md && exit 0 || exit 1
release_linked_mkdocs:
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
VERSION_NUM=$(jq '.version' < package.json)
VERSION_NUM=${VERSION_NUM#\"}
VERSION_NUM=${VERSION_NUM%\"}
'echo "VERSION_NUM: $VERSION_NUM"'
cat mkdocs.yml
GREP_VERSION_NUM=$(cat mkdocs.yml | grep $VERSION_NUM)
'echo GREP_VERSION_NUM: $GREP_VERSION_NUM'
test -z "$GREP_VERSION_NUM" && exit 1 || exit 0
\ No newline at end of file
name: Release
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- echo 'NYI'
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
\ No newline at end of file
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