From 16a982c51a77e68efc78afdd44d22b040bf1e8e6 Mon Sep 17 00:00:00 2001 From: Lucas Almeida Tiburtino da Silva <64665422+LucasATS@users.noreply.github.com> Date: Tue, 16 Jan 2024 11:19:47 -0400 Subject: [PATCH] Create npm-publish-github-packages.yml --- .../workflows/npm-publish-github-packages.yml | 34 +++++++++++++++++++ 1 file changed, 34 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 0000000..6d9aaf8 --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,34 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: https://npm.pkg.github.com/ + - run: cd SERVER + - run: npm run server + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}