-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.24 KB
/
Copy pathgithub-packages-only.yml
File metadata and controls
54 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: GitHub Packages Publish Only
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 1.0.2)'
required: true
default: '1.0.2'
permissions:
contents: read
packages: write
jobs:
publish-github-packages:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js for GitHub Packages
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
scope: '@syrex1013'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build package
run: npm run build
- name: Run linting
run: npm run lint
- name: Publish to GitHub Packages
run: npm publish
- name: Verify GitHub Packages publication
run: |
echo "✅ Package published to GitHub Packages successfully!"
echo "Version: $(node -p "require('./package.json').version")"
echo "GitHub Packages URL: https://github.com/syrex1013/bolt-driver-api-sdk/packages"