Skip to content

Commit

Permalink
feat: implement package release
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenest committed Nov 2, 2021
1 parent 990e09e commit 91f973a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 35 deletions.
51 changes: 21 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
name: Create Release
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Publish Packages

on:
workflow_dispatch:
inputs:
version:
description: 'Semantic version (major | minor | patch | premajor | preminor | prepatch | prerelease)'
default: 'patch'
required: true

release:
types:
- created

jobs:
version:
name: Create version
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Npm install
run: npm ci
- name: Configure git
run: |
git config user.name "CI"
git config user.email "niklasvh@gmail.com"
- name: Create release
run: npm run release -- --preset eslint --release-as ${{ github.event.inputs.version }}
- name: Print details
run: |
cat package.json
cat CHANGELOG.md
git tag
- name: Push git version
run: git push --follow-tags origin master
node-version: '12.x'
registry-url: https://registry.npmjs.org/
scope: '@airbridge'

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "html2canvas",
"name": "html2canvas",
"title": "@airbridge/html2canvas",
"name": "@airbridge/html2canvas",
"description": "Screenshots with JavaScript",
"main": "dist/html2canvas.js",
"module": "dist/html2canvas.esm.js",
Expand All @@ -17,10 +17,10 @@
},
"repository": {
"type": "git",
"url": "git@github.com:niklasvh/html2canvas.git"
"url": "git@github.com:ab180/html2canvas.git"
},
"bugs": {
"url": "https://github.com/niklasvh/html2canvas/issues"
"url": "https://github.com/ab180/html2canvas/issues"
},
"devDependencies": {
"@babel/cli": "^7.4.3",
Expand Down Expand Up @@ -115,7 +115,7 @@
"watch:unittest": "mocha --require ts-node/register --watch-extensions ts -w src/**/__tests__/*.ts",
"start": "ts-node tests/server --port=8080 --cors=8081"
},
"homepage": "https://html2canvas.hertzen.com",
"homepage": "https://github.com/ab180/html2canvas",
"license": "MIT",
"dependencies": {
"css-line-break": "2.0.1",
Expand Down

0 comments on commit 91f973a

Please sign in to comment.