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