Skip to content

Commit

Permalink
chore(ci): add github action release commit (#6897)
Browse files Browse the repository at this point in the history
[release]
  • Loading branch information
clarkdo authored and pi0 committed Jan 21, 2020
1 parent d60f990 commit 1b87123
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit 1b87123

Please sign in to comment.