Skip to content

Commit

Permalink
ci: adjust publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpza committed Dec 22, 2024
1 parent c4ba327 commit 1039e07
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
name: Publish

on:
push:
tags:
- v*.*.*
workflow_dispatch:
inputs:
publishTag:
description: "npm publish --tag <tag>"
required: true
default: "latest"
type: choice
options:
- latest
- next
- test
bump:
description: "Changelogen bump flag"
required: true
default: "--bump"
type: choice
options:
- --bump
- --prerelease
- --canary

permissions:
id-token: write
Expand All @@ -27,11 +44,11 @@ jobs:
- name: Install Packages
run: yarn install

- name: Build
run: yarn build
- name: Bump Version
run: yarn changelogen --release --push ${{ github.event.inputs.bump }}

- name: Publish to NPM
run: npm publish --provenance
run: npm publish --provenance --tag ${{ github.event.inputs.publishTag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1039e07

Please sign in to comment.