-
Notifications
You must be signed in to change notification settings - Fork 143
47 lines (47 loc) · 1.43 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
name: Release
on:
release:
types:
- created
jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore binaries from cache
uses: actions/cache/restore@v4
with:
path: ./bin
key: binary
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
id: go
- name: lint, test and build
env:
TAG: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make lint test build build-installer
echo ${{secrets.REPO_KEY}} | docker login --username ${{secrets.REPO_USER}} --password-stdin
make publish
TAG=${TAG} make olm
gh release upload ${{github.event.release.tag_name}} ./dist/install.yaml#install.yaml --clobber || echo "fix me NOT enough security permissions"
gh release upload ${{github.event.release.tag_name}} ./config/crd/overlay/crd.yaml#crd.yaml --clobber || echo "fix me NOT enough security permissions"
- name: Prapare binary cache
uses: actions/cache@v4
with:
path: ./bin
key: binary
- uses: actions/upload-artifact@v4
with:
name: olm
path: bundle
retention-days: 1