Skip to content

Commit 88abe37

Browse files
authored
Merge pull request #12 from rahu619/rahu619-patch
Upgrade GitHub Actions to use v4 and improve validation
2 parents e17f4ac + 801abf0 commit 88abe37

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
name: Release
22
on:
3-
workflow_dispatch: # Manual trigger alone
3+
workflow_dispatch: # Manual trigger
44
push:
55
tags:
6-
- 'v*' # Trigger on version tags
6+
- 'v*' # Trigger on version tags (e.g., v1.0.0)
77

88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11-
1211
steps:
1312
- name: Checkout Code
14-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4 # Updated to v4 for better performance
1514

1615
- name: Setup Node.js
17-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4 # Updated to v4
1817
with:
19-
node-version: "18.x"
18+
node-version: "20.x"
2019
registry-url: "https://registry.npmjs.org/"
21-
scope: "@rahu619" # Replace with your actual organization name
22-
23-
- name: Debug npm auth
24-
run: |
25-
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
26-
npm whoami
20+
scope: "@rahu619" # Package is scoped as @rahu619/cron-converter-u2q
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2723

2824
- name: Install Dependencies
2925
run: npm ci
@@ -41,7 +37,7 @@ jobs:
4137
- name: Validate Version
4238
run: |
4339
if [[ ! ${{ steps.package-version.outputs.version }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
44-
echo "Invalid version format"
40+
echo "Invalid version format: ${{ steps.package-version.outputs.version }}"
4541
exit 1
4642
fi
4743

0 commit comments

Comments
 (0)