Skip to content

Commit a4be1cc

Browse files
committed
ci: add GitHub Packages publish workflow
1 parent 88ecad2 commit a4be1cc

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish to GitHub Packages
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
publish-github-packages:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "22"
21+
registry-url: "https://npm.pkg.github.com"
22+
cache: "npm"
23+
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Install Python dependencies
32+
run: node scripts/run_python.mjs -m pip install --disable-pip-version-check -r skills/omv-report/scripts/requirements.txt
33+
34+
- name: Configure package for GitHub Packages
35+
run: |
36+
npm pkg set name=@bx33661/oh-my-vul
37+
npm pkg set publishConfig.registry=https://npm.pkg.github.com
38+
39+
- name: Publish to GitHub Packages
40+
run: npm publish
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)