Skip to content

Commit

Permalink
feat: configure GitHub Actions for NPM package release and update pac…
Browse files Browse the repository at this point in the history
…kage name
  • Loading branch information
andersao committed Dec 14, 2024
1 parent e04d08d commit 49ca82e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release NPM Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: "@gronda-team"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: "@gronda-team"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
- run: npm --no-git-tag-version version $RELEASE_TAG_NAME
env:
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@gronda-team:registry=https://npm.pkg.github.com
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@pezzo/llm-toolkit",
"name": "@gronda-team/llm-toolkit",
"version": "0.7.0",
"description": "Your library description",
"main": "dist/index.js",
Expand All @@ -19,5 +19,8 @@
"devDependencies": {
"@types/node": "^20.12.7",
"typescript": "^5.1.3"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
}

0 comments on commit 49ca82e

Please sign in to comment.