58 lines (56 loc) · 1.47 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
49
50
51
52
53
54
55
56
57
58
name: release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow --tags
-
name: Get tag
uses: olegtarasov/get-tag@v2
id: tag
-
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
-
name: Get Latest Release
id: latest_version
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: ${{ github.repository_owner }}
repo: datadog-operator
excludes: prerelease, draft
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --skip-publish
env:
GORELEASER_PREVIOUS_TAG: ${{steps.latest_version.outputs.release}}
-
name: Generate Plugin manifest
run: ./hack/release/generate-plugin-manifest.sh ${{steps.tag.outputs.tag}}
-
name: Release
uses: softprops/action-gh-release@v1
with:
body_path: dist/CHANGELOG.md
prerelease: ${{ contains(github.ref, '-rc.') }}
files: |
dist/datadog-plugin.yaml
dist/*.zip
dist/*.tar.gz
env:
COMMIT_TAG: ${{steps.tag.outputs.tag}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}