From 7a64eafb16e1b69f8a3cda114ab257b40b406b7f Mon Sep 17 00:00:00 2001 From: Cristiano Tofani Date: Thu, 20 Jul 2023 09:39:22 +0200 Subject: [PATCH] separate workflows --- .github/workflows/github-release.yml | 23 +++++++++++++++++++++++ .github/workflows/release.yml | 20 ++------------------ 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/github-release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 00000000..205b1054 --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,23 @@ +name: Publish the package to Github Package Registry +on: + release: + types: [created] +permissions: + packages: write +jobs: + github-package: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2 + - name: Set up Node.js + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c #v3.6 + with: + node-version: 18.x + registry-url: 'https://npm.pkg.github.com' + - name: Install dependencies and build with builder bob + run: yarn install --frozen-lockfile + - name: Publish Package + run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 822bfebb..81c555ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish the package +name: Publish the package npm registry on: release: types: [created] @@ -19,20 +19,4 @@ jobs: - name: Publish package on NPM 📦 run: npm publish --access=public env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} - github-package: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2 - - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c #v3.6 - with: - node-version: 18.x - registry-url: 'https://npm.pkg.github.com' - - name: Install dependencies and build with builder bob - run: yarn install --frozen-lockfile - - name: Publish Package - run: yarn publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} \ No newline at end of file