From 25d0e3497884eedb7ead2a6adb6f5889479678a8 Mon Sep 17 00:00:00 2001 From: Henry Allen <31718268+hmallen99@users.noreply.github.com> Date: Mon, 13 May 2024 11:57:23 -0400 Subject: [PATCH] Add release action (#24) --- .github/workflows/release.yaml | 19 +++++++++++++++++++ package-lock.json | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c8d6aba --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,19 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 8d37228..2dcb4ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "babylon-testing-library", - "version": "0.0.1", + "version": "1.0.0-alpha", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "babylon-testing-library", - "version": "0.0.1", + "version": "1.0.0-alpha", "license": "MIT", "dependencies": { "@babylonjs/core": "^7.5.0",