This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
forked from docusign/docusign-esign-node-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59d3800
commit 3d4436b
Showing
2 changed files
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: NPM Package Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- next | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install Dependencies | ||
env: | ||
HUSKY_SKIP_INSTALL: 1 # Skip install of Husky | ||
run: yarn install --frozen-lockfile | ||
|
||
# - name: Check Lint | ||
# run: yarn lint | ||
|
||
# - name: Run Tests | ||
# run: | | ||
# yarn test | ||
|
||
- name: Check version changes | ||
uses: EndBug/version-check@v1 | ||
id: check | ||
|
||
- name: Version update detected | ||
if: steps.check.outputs.changed == 'true' | ||
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"' | ||
|
||
- name: Publish | ||
if: steps.check.outputs.changed == 'true' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
npm publish $([ "$GITHUB_REF" == 'refs/heads/next' ] && echo '--tag next') | ||
echo "::set-env name=PACKAGE_VERSION::$(cat package.json | jq -r '.version')" | ||
# - name: Upload Code Coverage (Codecov) | ||
# if: steps.check.outputs.changed == 'true' && success() | ||
# env: | ||
# CODE_COV: ${{ secrets.CODE_COV }} | ||
# run: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info | ||
|
||
- name: Create Release | ||
if: github.ref == 'refs/heads/master' && steps.check.outputs.changed == 'true' | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
tag_name: v${{ env.PACKAGE_VERSION }} | ||
release_name: v${{ env.PACKAGE_VERSION }} | ||
draft: false | ||
prerelease: false |
This file was deleted.
Oops, something went wrong.