Skip to content

Commit

Permalink
add release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
scurker committed May 19, 2021
1 parent 6ffd661 commit 0fed579
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 47 deletions.
53 changes: 52 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -51,4 +51,55 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
path-to-lcov: ./lcov.info
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-16-
- name: Use node version 16
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build:docs
- name: Publish docs to github pages
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: docs/build
nightly:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-16-
- name: Use node version 16
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm version "$(npm view currency.js@latest version)-${GITHUB_SHA:0:8}" --allow-same-version --no-git-tag-version
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

0 comments on commit 0fed579

Please sign in to comment.