chore(ci): add github action release commit (#6897)

[release]
This commit is contained in:
Xin Du (Clark) 2020-01-20 20:50:07 +00:00 committed by Pooya Parsa
parent d60f990b09
commit 1b87123023

View File

@ -268,3 +268,38 @@ jobs:
- name: test e2e
run: yarn test:e2e
needs: build
release-commit:
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && contains(github.event.head_commit.message, '[release]')
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: restore workspace cache
uses: actions/cache@v1
with:
path: ${{ github.workspace }}
key: ${{ matrix.os }}-node-v${{ matrix.node }}-nuxt-${{ github.sha }}
- name: bump version
run: yarn lerna version --yes --no-git-tag-version --no-push
- name: build
run: PACKAGE_SUFFIX=edge yarn build
- name: publish
run: |
if [ "$ref" = "refs/heads/next" ]; then tag="--tag next"; fi
./scripts/workspace-run npm publish -q
env:
ref: ${{ github.ref }}
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
needs: [lint-app, test-dev, test-unit, test-e2e]