Skip to content

Commit

Permalink
chore(deploy): worflow for next
Browse files Browse the repository at this point in the history
  • Loading branch information
bartholomej committed Jan 5, 2020
1 parent 9832de7 commit 23604bb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
tags:
- 'v*'
branches:
- 'next*'
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -17,38 +22,33 @@ jobs:
node-version: 13.x
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies # Install all deps
- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Publish NPM
# Publish with STABLE
- name: Publish NPM latest
if: startsWith(github.ref, 'refs/tags/v') # run only with tag
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Publish to GitHub Package Registry
# - name: Set up package for GPR
# run: yarn gpr:setup

# - name: Use GPR
# uses: actions/setup-node@master
# with:
# node-version: 13
# registry-url: https://npm.pkg.github.com/
# scope: '@bartholomej'

# - name: Publish to GitHub Package Registry
# run: |
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{github.token}}
# Publish with NEXT tag
- name: Publish NPM next!
if: github.ref == 'refs/heads/next' # run only with NEXT branch
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Deploy Github Pages (only with v* tag)
- name: Prepare Github Pages
if: startsWith(github.ref, 'refs/tags/v') # run only with tag
run: cp -r dist/ demo/dist/

- name: Deploy Github Pages
if: startsWith(github.ref, 'refs/tags/v') # run only with tag
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-scrolltop",
"version": "2.0.0",
"version": "2.0.1-next.2",
"description": "Lightweight, Material Design inspired plugin for scrolling on top of the html page (with jQuery)",
"main": "./dist/material-scrolltop.js",
"types": "./dist/material-scrolltop.d.ts",
Expand Down

0 comments on commit 23604bb

Please sign in to comment.