-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.34 KB
/
release.yaml
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
name: Release-Tag
on:
push:
branches: [ master ]
env:
GH_ACCESS_TOKEN: ${{ secrets.ARMOSEC_GITHUB_ACCESS_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ env.GH_ACCESS_TOKEN }}
- run: git config --global url.https://[email protected]/armosec/.insteadOf https://github.com/armosec/
- run: git config --global url.https://[email protected]/kubescape/.insteadOf https://github.com/kubescape/
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test & coverage
id: unit-test
run: go test -v ./... -covermode=atomic -coverprofile=coverage.out
- name: Convert coverage count to lcov format
uses: jandelgado/gcov2lcov-action@v1
- name: Submit coverage tests to Coveralls
continue-on-error: true
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
- name: Create a release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v0.0.${{ github.run_number }}
release_name: Release v0.0.${{ github.run_number }}
draft: false
prerelease: false