-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.54 KB
/
Copy pathosv-scanner-release.yml
File metadata and controls
54 lines (51 loc) · 1.54 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
# https://google.github.io/osv-scanner/github-action/#scan-on-release
name: Go Release Process
on:
push:
tags:
- "*" # triggers only if push new tag version, like `0.8.4` or else
permissions:
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
actions: read
# Require writing security events to upload SARIF file to security tab
security-events: write
# to fetch code (actions/checkout)
contents: read
jobs:
osv-scan:
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.3.8"
with:
# Recursive scan supports multiple ecosystems:
# Go, Node.js, Python, Rust, Java, etc.
scan-args: |-
./
permissions:
# Require writing security events to upload SARIF file to security tab
security-events: write
tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Placeholder test step
run: echo "Configure project-specific tests here"
# Replace placeholder steps with actual project tests
# Examples:
# npm test
# go test ./...
# pytest
# cargo test
release:
needs: # Needs both tests and osv-scan to pass
- tests
- osv-scan
runs-on: ubuntu-latest
# Your actual release steps
steps:
- name: Placeholder release step
run: echo "Configure release steps here"
# Add actual release/build/publish steps here
# Examples:
# - Build binaries
# - Publish Docker image
# - Create GitHub Release
# - Upload artifacts