Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit 421760b

Browse files
committed
updated actions
1 parent bdac8ab commit 421760b

File tree

3 files changed

+72
-29
lines changed

3 files changed

+72
-29
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,4 @@ jobs:
4242
uses: codecov/[email protected]
4343
with:
4444
token: ${{ secrets.CODECOV_TOKEN }}
45-
file: ./coverage.txt
46-
codeql:
47-
name: "CodeQL Check"
48-
needs: [build, test]
49-
strategy:
50-
matrix:
51-
go-version: [1.16.x]
52-
platform: [ubuntu-latest, macos-latest, windows-latest]
53-
fail-fast: true
54-
runs-on: ${{ matrix.platform }}
55-
steps:
56-
- name: Checkout code
57-
uses: actions/[email protected]
58-
- name: Initialize CodeQL
59-
uses: github/codeql-action/init@v1
60-
with:
61-
languages: go
62-
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@v1
64-
release:
65-
needs: [build, test, codeql]
66-
name: "Tagged Release"
67-
runs-on: "ubuntu-latest"
68-
steps:
69-
- uses: "marvinpinto/action-automatic-releases@latest"
70-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
71-
with:
72-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
73-
prerelease: false
45+
file: ./coverage.txt

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name: "Code Scanning - Action"
33

44
on:
5+
push:
6+
branches: main
57
schedule:
68
# ┌───────────── minute (0 - 59)
79
# │ ┌───────────── hour (0 - 23)

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: "tagged-release"
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
name: "Build & Unit Tests"
11+
strategy:
12+
matrix:
13+
platform: [ubuntu-latest, macos-latest, windows-latest]
14+
fail-fast: true
15+
runs-on: ${{ matrix.platform }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/[email protected]
19+
- name: Install Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.16.x
23+
- name: Build
24+
run: go build ./...
25+
- name: Test
26+
run: go test -v -race ./...
27+
codeql:
28+
name: "CodeQL Check"
29+
needs: [build]
30+
strategy:
31+
matrix:
32+
go-version: [1.16.x]
33+
platform: [ubuntu-latest, macos-latest, windows-latest]
34+
fail-fast: true
35+
runs-on: ${{ matrix.platform }}
36+
steps:
37+
- name: Checkout code
38+
uses: actions/[email protected]
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v1
41+
with:
42+
languages: go
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v1
45+
release:
46+
needs: [build, codeql]
47+
name: "Tagged Release"
48+
runs-on: "ubuntu-latest"
49+
steps:
50+
- name: Checkout code
51+
uses: actions/[email protected]
52+
- name: Build changelog
53+
id: build_changelog
54+
uses: mikepenz/release-changelog-builder-action@main
55+
with:
56+
configuration: 'release-config.json'
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
- name: Create release
60+
id: create_release
61+
uses: actions/create-release@latest
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
with:
65+
tag_name: ${{ github.ref }}
66+
release_name: Release ${{ github.ref }}
67+
body: ${{steps.build_changelog.outputs.changelog}}
68+
draft: false
69+
prerelease: false

0 commit comments

Comments
 (0)