Skip to content

Commit 718b901

Browse files
committed
CI/CD
1 parent c5e906f commit 718b901

3 files changed

Lines changed: 124 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- "codex/**"
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ci-${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
validate:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 20
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version-file: go.mod
31+
cache: true
32+
33+
- name: Download dependencies
34+
run: go mod download
35+
36+
- name: Run CI checks
37+
run: make ci

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: release-${{ github.ref }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build-and-release:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 30
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version-file: go.mod
29+
cache: true
30+
31+
- name: Download dependencies
32+
run: go mod download
33+
34+
- name: Build release artifacts
35+
run: |
36+
VERSION="${GITHUB_REF_NAME:-manual}"
37+
./scripts/build-release.sh "${VERSION}" dist
38+
39+
- name: Upload workflow artifacts
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: eip7702-go-dist-${{ github.run_id }}
43+
path: |
44+
dist/*.tar.gz
45+
dist/checksums.txt
46+
47+
- name: Publish GitHub release
48+
if: startsWith(github.ref, 'refs/tags/')
49+
uses: softprops/action-gh-release@v2
50+
with:
51+
generate_release_notes: true
52+
files: |
53+
dist/*.tar.gz
54+
dist/checksums.txt

.github/workflows/vulncheck.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Vulnerability Scan
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * 1"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
govulncheck:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 20
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
cache: true
25+
26+
- name: Download dependencies
27+
run: go mod download
28+
29+
- name: Install govulncheck
30+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
31+
32+
- name: Run govulncheck
33+
run: govulncheck ./...

0 commit comments

Comments
 (0)