Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix npm publish and add name to jobs #9

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading