@kaviyarasan022/image-compressor-target 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/.github/publish.yml +24 -17
  2. package/package.json +1 -1
@@ -1,31 +1,38 @@
1
- name: Publish to npm
1
+ name: Publish npm package
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - main # or "master" the branch you want to trigger publish
6
+ - main # Run only on push to main branch
7
7
 
8
8
  jobs:
9
9
  publish:
10
10
  runs-on: ubuntu-latest
11
11
 
12
12
  steps:
13
- - name: Checkout repository
14
- uses: actions/checkout@v4
13
+ - uses: actions/checkout@v3
15
14
 
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: 20
20
- registry-url: 'https://registry.npmjs.org/'
15
+ - name: Use Node.js
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: 20
19
+ registry-url: https://registry.npmjs.org/
21
20
 
22
- - name: Install dependencies
23
- run: npm ci
21
+ - name: Authenticate npm
22
+ run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
24
23
 
25
- - name: Build (if applicable)
26
- run: npm run build --if-present
24
+ - name: Install dependencies
25
+ run: npm install
27
26
 
28
- - name: Publish package
29
- run: npm publish --access public
30
- env:
31
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27
+ - name: Bump version
28
+ run: |
29
+ npm version patch -m "ci: bump version to %s"
30
+
31
+ - name: Publish package
32
+ run: npm publish --access public
33
+
34
+ - name: Push changes & tags
35
+ run: |
36
+ git config user.name "github-actions"
37
+ git config user.email "github-actions@github.com"
38
+ git push origin main --tags
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaviyarasan022/image-compressor-target",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A Node.js CLI tool to compress images to a target size.",
5
5
  "main": "index.js",
6
6
  "bin": {