From 6e77b02567decb352e73a0dd320ae4c5a56865a3 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon <44397098+microbit-matt-hillsdon@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:22:41 +0100 Subject: [PATCH] Publish to the npm registry not GHP (#10) This will enable easy consumption from the open source ML tool app. --- .github/workflows/header-gen.yml | 10 ++++++---- header-gen/package.json | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/header-gen.yml b/.github/workflows/header-gen.yml index a3a8f24..31fc864 100644 --- a/.github/workflows/header-gen.yml +++ b/.github/workflows/header-gen.yml @@ -4,12 +4,14 @@ on: release: types: [created] push: - branches: '*' + branches: + - "*" paths: - "header-gen/**" - "**/header-gen.yml" pull_request: - branches: '*' + branches: + - "*" paths: - "header-gen/**" - "**/header-gen.yml" @@ -29,7 +31,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - registry-url: "https://npm.pkg.github.com" + registry-url: "https://registry.npmjs.org" cache: npm cache-dependency-path: header-gen/package-lock.json @@ -56,4 +58,4 @@ jobs: if: github.event_name == 'release' && github.event.action == 'created' working-directory: ./header-gen env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/header-gen/package.json b/header-gen/package.json index 6b71777..271289e 100644 --- a/header-gen/package.json +++ b/header-gen/package.json @@ -1,5 +1,5 @@ { - "name": "@microbit-foundation/ml-header-generator", + "name": "@microbit/ml-header-generator", "version": "0.4.0", "description": "A simple TS script to generate a header blob for the ML runner", "author": "Micro:bit Educational Foundation ",