Skip to content

Commit

Permalink
fix: fix npm publish and add name to jobs (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwv authored Dec 31, 2024
1 parent b9f63d2 commit 6086e48
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -57,6 +58,7 @@ jobs:
path: dist

deploy-to-cloudflare-pages-staging:
name: Deploy to Cloudflare Pages Staging
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -98,6 +100,7 @@ jobs:
command: pages deploy dist --project-name=how-to-lookscanned

deploy-to-cloudflare-pages:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -139,6 +142,7 @@ jobs:
command: pages deploy dist --project-name=how-to-lookscanned --branch=release

deploy-to-github-pages:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -176,6 +180,7 @@ jobs:
uses: actions/deploy-pages@v4

publish-to-npm:
name: Publish to npm
runs-on: ubuntu-latest
needs:
- build
Expand All @@ -197,6 +202,7 @@ jobs:
with:
node-version: 20
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: pnpm install
Expand All @@ -212,7 +218,8 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gpr:
publish-to-github-packages:
name: Publish to GitHub Packages
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
Expand All @@ -232,6 +239,7 @@ jobs:
with:
node-version: 20
cache: 'pnpm'
registry-url: https://npm.pkg.github.com/

- name: Install dependencies
run: pnpm install
Expand All @@ -247,6 +255,7 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

upload-release:
name: Upload Assets to Release
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
Expand Down

0 comments on commit 6086e48

Please sign in to comment.