From ee9f8b1aa7050556e9f4f6cf7727b1a1bcff59e6 Mon Sep 17 00:00:00 2001 From: George Schneeloch Date: Tue, 28 Jun 2022 09:43:22 -0400 Subject: [PATCH] fix(deploy): deploy from master so that we can publish --- .github/workflows/ci.yml | 14 +++++++++++--- .github/workflows/npm-publish.yml | 17 +++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73c3417b..0a7e9e12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: node_js CI on: - push: - branches: - - master pull_request: branches: - '**' @@ -40,3 +37,14 @@ jobs: - name: Run Coverage uses: codecov/codecov-action@v2 + + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + + - name: Preview semantic-release version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + run: npm run semantic-release --dry-run --branches=${{ steps.extract_branch.outputs.branch}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1ae31bc9..be167da1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,8 +1,8 @@ name: Release CI on: push: - tags: - - '*' + branches: + - master jobs: release: @@ -13,6 +13,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + token: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v1 @@ -22,9 +23,21 @@ jobs: - name: Install dependencies run: npm ci + - name: Lint + run: npm run lint + + - name: Test + run: npm run test + - name: Create Build run: npm run compile-prod + - name: Verify es5 + run: npm run is-es5 + + - name: Run Coverage + uses: codecov/codecov-action@v2 + - name: Release Package env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}