Skip to content

Commit

Permalink
Update CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed Jul 20, 2024
1 parent 354326d commit dd5391c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
43 changes: 26 additions & 17 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@ on:
jobs:
npm:
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
- run: cat /home/runner/work/_temp/.npmrc
uses: actions/checkout@master
- name: Publish
run: |
# Change publish registry
echo "$(jq '.publishConfig.registry = "https://registry.npmjs.org"' package.json)" > package.json
# Publish package
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
# 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
# - run: cat /home/runner/work/_temp/.npmrc
# - name: Publish
# run: |
# # Change publish registry
# echo "$(jq '.publishConfig.registry = "https://registry.npmjs.org"' package.json)" > package.json
# # Publish package
# npm publish --provenance --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
10 changes: 1 addition & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,5 @@ jobs:

cd:
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
# uses: evanplaice/jquery-csv/.github/workflows/npm.yml@main
uses: evanplaice/jquery-csv/.github/workflows/npm.yml@main

0 comments on commit dd5391c

Please sign in to comment.