From 40a31f6e1183fc99ecbb925a606c0c196c4ba338 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 13 May 2024 14:03:46 +0200 Subject: [PATCH] Setup GH action for publishing --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ package.json | 4 ++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bb14def --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/package.json b/package.json index c321db1..c9d776b 100644 --- a/package.json +++ b/package.json @@ -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",