Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 authored Jan 29, 2023
1 parent db99edb commit b45dc73
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to NPM
run-name: ${{ github.actor }} triggered this job
on:
workflow_dispatch:
inputs:
increment:
description: 'Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]'
required: true
default: 'patch'
type: string
dry-run:
description: 'Do not touch or write anything, but show the commands'
default: true
type: boolean

jobs:
release-it:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn

- name: Setup NPM auth token
run: |
npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}
- if: ${{ inputs.dry-run }}
run: |
yarn release ${{ inputs.increment }} -d --ci
- if: ${{ !inputs.dry-run }}
run: |
yarn release ${{ inputs.increment }} --ci

0 comments on commit b45dc73

Please sign in to comment.