Skip to content

Commit

Permalink
ci: edit publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard committed Mar 21, 2024
1 parent f1ab957 commit 99d928f
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
name: publish

on:
workflow_dispatch:
inputs:
kind:
description: Kind of release
default: minor
type: choice
options:
- prepatch
- patch
- preminor
- minor
- premajor
- major
required: true
push:
tags:
- v*

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish update
uses: boywithkeyboard/publisher@v2
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: npm ci

- name: Build Package
run: npm run build

- name: Publish Package
uses: JS-DevTools/npm-publish@v3
with:
kind: ${{github.event.inputs.kind}}
token: ${{ secrets.NPM_TOKEN }}
package: ./build
provenance: true

- name: Publish Release
uses: boywithkeyboard/publisher@v3

0 comments on commit 99d928f

Please sign in to comment.