Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
👷 Automated version bump / publish
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Feb 13, 2021
1 parent 5a64a6c commit bf55063
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Version and Release

on:
workflow_dispatch:
inputs:
newversion:
description: "Semantic Version Bump Type (major minor patch)"
default: patch

env:
node_version: 14

jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: git config --global user.name github-action
- run: git congig --global user.email [email protected]
- run: yarn version --${{ github.event.inputs.newversion }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- run: yarn publish . --new-version ${{ steps.package-version.outputs.current-version}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"lint": "vue-cli-service lint",
"package": "vue-cli-service build --target lib src/wrapper.ts",
"prepublishOnly": "npm run package",
"postpublish": "git push --follow-tags",
"test": "vue-cli-service lint"
},
"unpkg": "dist/package/viewer.umd.min.js",
Expand Down

0 comments on commit bf55063

Please sign in to comment.