Skip to content

Commit 23604bb

Browse files
committed
chore(deploy): worflow for next
1 parent 9832de7 commit 23604bb

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

.github/workflows/main.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
branches:
8+
- 'next*'
9+
pull_request:
10+
branches:
11+
- master
712

813
jobs:
914
build:
@@ -17,38 +22,33 @@ jobs:
1722
node-version: 13.x
1823
registry-url: 'https://registry.npmjs.org'
1924

20-
- name: Install dependencies # Install all deps
25+
- name: Install dependencies
2126
run: yarn
2227

2328
- name: Build
2429
run: yarn build
2530

26-
- name: Publish NPM
31+
# Publish with STABLE
32+
- name: Publish NPM latest
33+
if: startsWith(github.ref, 'refs/tags/v') # run only with tag
2734
run: npm publish
2835
env:
2936
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3037

31-
# Publish to GitHub Package Registry
32-
# - name: Set up package for GPR
33-
# run: yarn gpr:setup
34-
35-
# - name: Use GPR
36-
# uses: actions/setup-node@master
37-
# with:
38-
# node-version: 13
39-
# registry-url: https://npm.pkg.github.com/
40-
# scope: '@bartholomej'
41-
42-
# - name: Publish to GitHub Package Registry
43-
# run: |
44-
# npm publish
45-
# env:
46-
# NODE_AUTH_TOKEN: ${{github.token}}
38+
# Publish with NEXT tag
39+
- name: Publish NPM next!
40+
if: github.ref == 'refs/heads/next' # run only with NEXT branch
41+
run: npm publish --tag next
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4744

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

5150
- name: Deploy Github Pages
51+
if: startsWith(github.ref, 'refs/tags/v') # run only with tag
5252
uses: peaceiris/actions-gh-pages@v2
5353
env:
5454
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "material-scrolltop",
3-
"version": "2.0.0",
3+
"version": "2.0.1-next.2",
44
"description": "Lightweight, Material Design inspired plugin for scrolling on top of the html page (with jQuery)",
55
"main": "./dist/material-scrolltop.js",
66
"types": "./dist/material-scrolltop.d.ts",

0 commit comments

Comments
 (0)