From 9faa4cbd7cf6d5d793c515c8fecb256105a0daee Mon Sep 17 00:00:00 2001 From: Evan Plaice Date: Sat, 20 Jul 2024 02:33:16 -0600 Subject: [PATCH] Update CI/CD --- .github/workflows/npm.yml | 32 +++++++++++++------------------- .github/workflows/release.yml | 20 ++------------------ 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index b48f38a..b8b0458 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -6,25 +6,19 @@ on: jobs: npm: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v4 + - name: Setup + uses: actions/setup-node@v4 + with: + registry-url: "https://registry.npmjs.org" + cache: npm + - run: npm ci - name: Publish - run: | - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc - npm publish --access public - - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # - name: Setup - # uses: actions/setup-node@v4 - # with: - # registry-url: "https://registry.npmjs.org" - # cache: npm - # - run: npm ci - # - name: Publish - # run: npm publish --provenance --access public - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 775178e..82cba53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,22 +11,6 @@ jobs: cd: needs: ci - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup - uses: actions/setup-node@v4 - with: - registry-url: "https://registry.npmjs.org" - cache: npm - - run: npm ci - - name: Publish - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - # uses: evanplaice/jquery-csv/.github/workflows/npm.yml@main + uses: evanplaice/jquery-csv/.github/workflows/npm.yml@main + secrets: inherit