Skip to content

Commit

Permalink
chore: update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 13, 2023
1 parent 70ecf30 commit 5db4030
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 67 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/publish-dry-run.yml

This file was deleted.

21 changes: 20 additions & 1 deletion .github/workflows/publish-npm-latest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: 🏷️ Publish NPM Latest

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
dryrun:
type: boolean
description: Dry-Run

permissions:
contents: write
Expand Down Expand Up @@ -55,6 +60,7 @@ jobs:
run: yarn run build

- name: OTP
if: ${{ inputs.dryrun != true }}
uses: step-security/wait-for-secrets@v1
id: wait-for-secrets
with:
Expand All @@ -63,7 +69,20 @@ jobs:
name: 'OTP to publish package'
description: 'OTP from authenticator app'
- name: "[dry-run] 🧪 GitHub Release / NPM Publish"
if: ${{ inputs.dryrun == true }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm whoami
npx release-it --ci --dry-run
- name: GitHub Release 🏷️ / NPM Publish 📦
if: ${{ inputs.dryrun != true }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 5db4030

Please sign in to comment.