Skip to content

Commit

Permalink
add workflow for publishing artifacts npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 committed Feb 6, 2025
1 parent 7ac6c7b commit 4e08457
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/publish-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Admin Plugin Artifact Package

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to publish from'
required: true
default: 'main'

jobs:
publish:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}

# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'

# Step 3: Install dependencies
- name: Install Dependencies
run: |
cd packages/artifact
yarn install
# Step 4: Generate ABIs
- name: Generate ABIs
run: |
cd packages/artifact
yarn generate
# Step 5: Build the package
- name: Build Package
run: |
cd packages/artifact
yarn build
# Step 6: Publish to NPM
- name: Publish to NPM
run: |
cd packages/artifact
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 4e08457

Please sign in to comment.