Repository navigation
65 lines (63 loc) · 2.67 KB
/
Copy pathrelease.yaml
File metadata and controls
65 lines (63 loc) · 2.67 KB
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
59
60
61
62
63
64
65
name: Release
on:
release:
types:
- published
- prereleased
permissions: {}
jobs:
release:
name: Release on GitHub
runs-on: vm-runner
permissions:
packages: write
contents: write
pages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Prepare binary cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ./bin
key: binary
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
id: go
- name: Extract Cosign version
id: cosign-version
run: echo "version=$(grep 'COSIGN_VERSION ?=' Makefile | awk '{print $3}')" >> $GITHUB_OUTPUT
- name: Install Cosign
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
with:
cosign-release: ${{ steps.cosign-version.outputs.version }}
- name: lint, test and build
env:
TAG: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt update
sudo apt install -y libgpgme-dev
make lint test build build-installer
echo ${{secrets.REPO_KEY}} | docker login --username ${{secrets.REPO_USER}} --password-stdin
echo ${{secrets.QUAY_ACCESSKEY}} | docker login quay.io --username '${{secrets.QUAY_USER}}' --password-stdin
TAG=${TAG} make publish
TAG=${TAG} make sign
TAG=${TAG} REGISTRY=quay.io make olm
if [[ "${{ github.event.release.target_commitish }}" == release-* ]]; then
echo "stable" > bundle/CHANNEL
else
echo "beta" > bundle/CHANNEL
fi
gh release upload ${{github.event.release.tag_name}} ./dist/install-no-webhook.yaml#install-no-webhook.yaml --clobber || echo "fix me NOT enough security permissions"
gh release upload ${{github.event.release.tag_name}} ./dist/install-with-webhook.yaml#install-with-webhook.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"
tar -czf olm-bundle.tar.gz -C bundle .
gh release upload ${{github.event.release.tag_name}} ./olm-bundle.tar.gz#olm-bundle.tar.gz --clobber || echo "fix me NOT enough security permissions"