Skip to content

Commit

Permalink
CI workflow for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
kishannareshpal committed Feb 14, 2024
1 parent faea064 commit 89df59a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish
on:
release:
types: created

jobs:
publish:
name: 'Publish NPM package to GitHub Packages'
runs-on: ubuntu-latest
timeout-minutes: 2
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://npm.pkg.github.com'
scope: '@the-curve-consulting'

- name: Install NPM dependencies
run: npm ci

- name: Publish the package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@the-curve-consulting:registry=https://npm.pkg.github.com
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.10.0
v20.11.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "expo-sensor-fusion",
"name": "@the-curve-consulting/expo-sensor-fusion",
"version": "0.1.0",
"description": "My new module",
"main": "build/index.js",
Expand Down

0 comments on commit 89df59a

Please sign in to comment.