diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..403f806 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e15cf1e --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@the-curve-consulting:registry=https://npm.pkg.github.com diff --git a/.nvmrc b/.nvmrc index 790e110..7ea6a59 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.10.0 +v20.11.0 diff --git a/package.json b/package.json index ec1416c..43e1722 100644 --- a/package.json +++ b/package.json @@ -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",