Skip to content

Commit

Permalink
Merge pull request #19 from alisaitteke/develop
Browse files Browse the repository at this point in the history
chore(ci): update GitHub Actions workflow to use npm install instead …
alisaitteke authored Nov 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents f77872e + 966443e commit d4c9615
Showing 2 changed files with 23 additions and 19 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -9,16 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
# Clean install to fix rollup issue
- name: Clean dependencies
run: |
rm -rf node_modules package-lock.json

# Önce normal install yapılır
- name: Install dependencies
run: npm ci
run: npm install

- name: Generate package-lock.json
run: npm install --package-lock-only

- run: npm run typecheck
- run: npm run lint
- run: npm run build
@@ -32,18 +35,15 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
cache: 'npm'

- name: Clean dependencies
run: |
rm -rf node_modules package-lock.json
- name: Install dependencies
run: npm ci
run: npm install

- name: Build package
run: npm run build
@@ -73,18 +73,15 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: 'npm'

- name: Clean dependencies
run: |
rm -rf node_modules package-lock.json
- name: Install dependencies
run: npm ci
run: npm install

- name: Build package
run: npm run build
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -15,15 +15,17 @@
},
"scripts": {
"clean": "rimraf dist",
"build": "tsup",
"dev": "tsup --watch",
"prebuild": "npm run clean",
"build": "tsup src/index.ts --format cjs,esm --dts",
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
"test": "vitest",
"coverage": "vitest run --coverage",
"lint": "eslint src/**/*.ts",
"format": "prettier --write src/",
"typecheck": "tsc --noEmit",
"prepare": "npm run build",
"prepublishOnly": "npm run lint"
"prepublishOnly": "npm test && npm run lint",
"postinstall": "npm run build"
},
"repository": {
"type": "git",
@@ -63,7 +65,12 @@
"node": ">=18"
},
"files": [
"dist/**/*"
"dist/**/*",
"src/**/*",
"package.json",
"package-lock.json",
"README.md",
"LICENSE"
],
"publishConfig": {
"access": "public"

0 comments on commit d4c9615

Please sign in to comment.