From ab5f66f2c3fa7d6384711b4e07e47b7769940281 Mon Sep 17 00:00:00 2001 From: nholtman Date: Mon, 16 Sep 2024 14:20:31 +0200 Subject: [PATCH] Create npm-publish-github-packages.yml Create workflow to publish Signed-off-by: nholtman --- .../workflows/npm-publish-github-packages.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 000000000..60e93062c --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,27 @@ +name: Publish package to GitHub Packages +on: + release: + types: [published] + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to GitHub Packages + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://npm.pkg.github.com' + # Defaults to the user or organization that owns the workflow file + scope: '@A-VISION-BV' + - run: npm ci + - run: grunt + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}