Skip to content

Commit 175909d

Browse files
committed
ci: release on tags (snap + ghcr)
1 parent dcc15b2 commit 175909d

3 files changed

Lines changed: 56 additions & 6 deletions

File tree

.github/workflows/ghcr.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ name: Build and Publish Docker Image
22

33
on:
44
push:
5-
branches:
6-
- main
75
tags:
86
- 'v*'
9-
pull_request:
10-
branches:
11-
- main
12-
workflow_dispatch:
137

148
env:
159
REGISTRY: ghcr.io

.github/workflows/snapstore.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and Publish Snap
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
snap:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Build snap
19+
id: build
20+
uses: snapcore/action-build@v1
21+
22+
- name: Publish to Snap Store
23+
uses: snapcore/action-publish@v1
24+
env:
25+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
26+
with:
27+
snap: ${{ steps.build.outputs.snap }}
28+
release: edge

snap/snapcraft.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: cve-scanner-cli
2+
base: core24
3+
version: git
4+
summary: CVE Scanner CLI
5+
description: |
6+
A command-line tool to search for CVEs (Common Vulnerabilities and Exposures)
7+
using public APIs. Results are displayed with color formatting and details
8+
using the rich library.
9+
10+
grade: stable
11+
confinement: strict
12+
license: MIT
13+
14+
apps:
15+
cvecli:
16+
command: bin/cvecli
17+
plugs:
18+
- network
19+
20+
parts:
21+
cvecli:
22+
plugin: python
23+
source: .
24+
python-requirements:
25+
- requirements.txt
26+
override-build: |
27+
craftctl default
28+
install -Dm755 cve_search_cli.py "$CRAFT_PART_INSTALL/bin/cvecli"

0 commit comments

Comments
 (0)