Skip to content

Commit

Permalink
Setup GH action for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed May 13, 2024
1 parent e86a984 commit 40a31f6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Package

on:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
# scope: '@pufferfinance'

- run: pnpm install
- run: pnpm release --increment prepatch
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "@pufferfinance/smart-contract-lib",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/PufferFinance/puffer-smart-contract-lib.git"
},
"type": "module",
"main": "./dist/main.cjs",
"module": "./dist/main.js",
Expand Down

0 comments on commit 40a31f6

Please sign in to comment.