Skip to content

Commit

Permalink
chore: publish workflow [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
waltergalvao committed Nov 5, 2024
1 parent 06b1e99 commit ecbc57e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 29 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish NPM Package

on:
workflow_dispatch:
inputs:
channel:
required: true
type: choice
description: NPM tag to publish the package to
options:
- oldversion
- alpha
- beta
- latest

jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- run: npm ci
- name: Publish to NPM
run: |
git config user.name "Currents NPM Bot"
git config user.email "[email protected]"
npm publish --tag ${{ github.event.inputs.channel }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit ecbc57e

Please sign in to comment.