diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..0923ac69 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - name: Install + run: npm ci + # - run: npm test + - name: Build + run: npm run build --if-present + - run: npm whoami + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index fe1acd86..e912589a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -88,14 +88,6 @@ jobs: asset_path: ./styles.css asset_name: styles.css asset_content_type: text/css - -# - run: npm whoami -# env: -# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} -# - run: npm publish -# env: -# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - notify: needs: upload-build uses: javalent/workflows/.github/workflows/notify.yml@main @@ -103,11 +95,3 @@ jobs: with: name: Fantasy Statblocks repo: fantasy-statblocks - - -# upgrade-overload: -# needs: publish -# uses: javalent/obsidian-overload/.github/workflows/upgrade.yml@main -# secrets: inherit -# with: -# module: fantasy-statblocks