Skip to content

Commit

Permalink
test tags
Browse files Browse the repository at this point in the history
  • Loading branch information
aefhm committed Oct 16, 2023
1 parent 186be4d commit 59fb520
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
name: publish

on:
push:
branches: main
on: pull_request
# 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
strategy:
matrix:
package: [clients/js, integrations/hardhat, contracts]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Publish ${{ matrix.package }} to NPM
- 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: ${{ matrix.package }}
dry-run: true
package: ${{ steps.extract-tag.outputs.NPM_PACKAGE }}

0 comments on commit 59fb520

Please sign in to comment.