Skip to content

Commit 9d5f79b

Browse files
committed
chore: cleanup unused steps and update npm registry workflow with authentication setup
1 parent ed4d7b1 commit 9d5f79b

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

.github/workflows/github-registry.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ jobs:
1515
name: "Pack"
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: "Variables"
19-
run: |
20-
echo "wr.event: ${{ github.event.workflow_run.event }}"
21-
echo "wr.conclusion: ${{ github.event.workflow_run.conclusion }}"
22-
echo "wr.head_branch: ${{ github.event.workflow_run.head_branch }}"
23-
echo "wr.id: ${{ github.event.workflow_run.id }}"
24-
echo "wr.name: ${{ github.event.workflow_run.name }}"
25-
echo "wr.run_number: ${{ github.event.workflow_run.run_number }}"
26-
echo "wr.run_attempt: ${{ github.event.workflow_run.run_attempt }}"
27-
echo "wr.url: ${{ github.event.workflow_run.url }}"
28-
echo "wr.head_sha: ${{ github.event.workflow_run.head_sha }}"
29-
echo "wr.head_ref: ${{ github.event.workflow_run.head_ref }}"
3018
# Checkout
3119
- name: Checkout
3220
uses: actions/checkout@v5

.github/workflows/npm-registry.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ jobs:
2828
run: bun install
2929
# Set Version
3030
- name: Set TAG variable
31-
run: echo "TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
31+
run: |
32+
echo "Full ref: ${{ github.event.workflow_run.head_branch }}"
33+
echo "TAG=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_ENV
3234
- name: Set VERSION variable
3335
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
3436
- name: Set Version
3537
run: npm version $VERSION --no-git-tag-version
38+
# Set Authentication
39+
- name: Create .npmrc
40+
run: |
41+
{
42+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
43+
} | tee -a .npmrc
3644
# Publish
3745
- name: Publish
3846
run: npm publish --access public
39-
env:
40-
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)