Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aefhm committed Oct 16, 2023
1 parent 5e712c1 commit 12ce9bc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish

on:
push:
tags:
- clients/js/[0-9].[0-9]+.[0-9]+
- contracts/[0-9].[0-9]+.[0-9]+
- integrations/hardhat/[0-9].[0-9]+.[0-9]+

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Extract package from tag
id: extract-tag
run: |
echo "NPM_PACKAGE=$(echo ${{ github.ref_name }} | grep -oE '(clients/js|contracts|integrations/hardhat)')" >> $GITHUB_OUTPUT
- name: Publish ${{ github.ref_name }} to NPM
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{ steps.extract-tag.outputs.NPM_PACKAGE }}

0 comments on commit 12ce9bc

Please sign in to comment.