Skip to content

Commit 2d9fc0b

Browse files
committed
chore: merge ci/test/release workflows into ci.yml
1 parent 35f5d1a commit 2d9fc0b

3 files changed

Lines changed: 35 additions & 54 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,60 @@
11
name: CI
2-
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
2+
93
permissions:
104
contents: write
5+
id-token: write
116
pull-requests: write
12-
checks: write
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: [main]
13+
1314
jobs:
1415
build:
1516
runs-on: ubuntu-latest
1617
steps:
17-
- name: Checkout code
18+
- name: Checkout
1819
uses: actions/checkout@v6
20+
1921
- name: Set up Go
2022
uses: actions/setup-go@v6
2123
with:
2224
go-version-file: go.mod
2325
cache: true
26+
2427
- name: Download dependencies
2528
run: go mod download
26-
- name: Run tests with coverage
29+
30+
- name: Run Tests
2731
run: go tool ginkgo run -coverprofile=coverage.out -covermode=atomic ./...
32+
2833
- name: Run octocov
2934
uses: k1LoW/octocov-action@v1
3035
with:
3136
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
3238
- name: Run golangci-lint
3339
uses: golangci/golangci-lint-action@v9
3440
with:
3541
version: latest
42+
43+
release:
44+
needs: build
45+
if: github.event_name == 'push'
46+
runs-on: ubuntu-latest
47+
outputs:
48+
release_created: ${{ steps.release.outputs.release_created }}
49+
tag_name: ${{ steps.release.outputs.tag_name }}
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v6
53+
54+
- name: Create Release PR
55+
id: release
56+
uses: googleapis/release-please-action@v4
57+
with:
58+
manifest-file: .github/config/release-please-manifest.json
59+
config-file: .github/config/release-please-config.json
60+
target-branch: main

.github/workflows/pr.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)