Skip to content

Commit

Permalink
Merge pull request #11 from adobe/workflows
Browse files Browse the repository at this point in the history
📦  Add publish workflows
  • Loading branch information
sangeetha5491 authored Mar 10, 2021
2 parents e24ca4c + 1199cba commit a874987
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/on-push-publish-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: on-push-publish-to-npm
on:
push:
branches:
- master
paths:
- "package.json"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm install
- run: npm test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/version-bump-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: version-bump-publish
on:
workflow_dispatch:
inputs:
level:
description: "<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease"
required: true
default: "patch"
tag:
description: "The tag to publish to."
required: false
default: "latest"
jobs:
checkout:
name: checkout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- uses: actions/setup-node@v1
with:
node-version: 10
- run: |
npm install
npm test
- name: bump and pub
if: ${{ github.event.inputs.level != '' }}
run: |
npm version ${{ github.event.inputs.level }}
git push
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
tag: ${{ github.event.inputs.tag }}
access: "public"

0 comments on commit a874987

Please sign in to comment.