Skip to content

- Removed return statement to avoid json datetime parsing error. #55

- Removed return statement to avoid json datetime parsing error.

- Removed return statement to avoid json datetime parsing error. #55

name: Build & Release
on:
pull_request:
push:
tags:
- v*
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16.x']
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm run package
- run: python create_package.py
create_release:
needs: build
if: contains(github.ref, '/tags/v')
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16.x']
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- name: Get tag version
id: tag_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Get repo name
id: repo_name
run: echo ::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | sed -e "s/:refs//")
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Build a release
run: |
npm install
npm run build
npm run package
python create_package.py
bash create_release.sh $SOURCE_TAG
env:
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }}
SECRET_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ steps.repo_name.outputs.REPOSITORY_NAME }}