Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
GH workflow release package (#334)
Browse files Browse the repository at this point in the history
* GH workflow release package

* Decrease node version to v10.x
  • Loading branch information
bcaglayan committed Mar 24, 2022
1 parent 0a7da2c commit 357cb38
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
workflow_dispatch:
inputs:
version_scale:
type: choice
description: Release Scale
options:
- patch
- minor
- major

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.THUNDRA_GITHUB_ACCESS_TOKEN }}
- name: Configure Git User
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- name: Use Node.js 10.x
uses: actions/setup-node@v2
with:
node-version: "10.x"
registry-url: https://registry.npmjs.org

- name: NPM Release
run: npm run release
env:
RELEASE_SCALE: ${{ github.event.inputs.version_scale }}
NODE_AUTH_TOKEN: ${{ secrets.THUNDRA_NPM_API_KEY }}
GITHUB_TOKEN: ${{ secrets.THUNDRA_GITHUB_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "tslint --project tsconfig.json -t stylish",
"release-minor": "npm install; npm run build; release-it minor --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish",
"release-minor-without-tag": "npm install; npm run build; release-it minor --ci --no-git.commit --no-git.push --no-git.tag --no-git.tagName='v${version}' --no-git.requireCleanWorkingDir --no-git.requireUpstream --no-github.release --npm.publish",
"release": "npm install; npm run build; release-it --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish",
"release": "npm install; npm run build; release-it ${RELEASE_SCALE} --ci --git.commit --git.push --git.tag --git.tagName='v${version}' --github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish",
"release-without-tag": "npm install; npm run build; release-it --ci --no-git.commit --no-git.push --no-git.tag --no-git.tagName='v${version}' --no-github.release --no-git.requireCleanWorkingDir --no-git.requireUpstream --npm.publish",
"release-dry-run": "npm install; npm run build; release-it minor --dry-run --ci --no-git.commit --no-git.push --no-git.tag --no-git.tagName='v${version}' --no-git.requireCleanWorkingDir --no-git.requireUpstream --no-github.release --no-npm.publish"
},
Expand Down

0 comments on commit 357cb38

Please sign in to comment.