Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish release to npm

inputs:
npm-token:
required: true
version:
required: true
release-directory:
Expand All @@ -22,14 +20,6 @@ runs:
shell: bash
run: yarn ci

- name: Verify npm token
shell: bash
run: |
if [ -z "${{ inputs.npm-token }}" ]; then
echo "Error: npm-token is not provided."
exit 1
fi

- name: Publish release to NPM
shell: bash
working-directory: ${{ inputs.release-directory }}
Expand All @@ -43,5 +33,4 @@ runs:
fi
npm publish --provenance --tag $TAG
env:
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
VERSION: ${{ inputs.version }}
6 changes: 3 additions & 3 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ on:
secrets:
github-token:
required: true
npm-token:
required: true

jobs:
release:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write

steps:
# Checkout the code
Expand Down Expand Up @@ -58,7 +59,6 @@ jobs:
- uses: ./.github/actions/npm-publish
with:
version: ${{ steps.get_version.outputs.version }}
npm-token: ${{ secrets.npm-token }}
release-directory: ${{ inputs.release-directory }}

# Create a release for the tag
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
release:
uses: ./.github/workflows/npm-release.yml
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

publish-docs:
Expand Down