forked from operator-framework/operator-lifecycle-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (73 loc) · 2.5 KB
/
goreleaser.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: release
on:
pull_request:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Get the image tag
if: startsWith(github.ref, 'refs/tags')
run: |
# Source: https://github.community/t/how-to-get-just-the-tag-name/16241/32
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo IMAGE_TAG="${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
# TODO dtfranz
# This action uses node12 and the source repo is archived;
# we should remove it or find a suitable replacement before it becomes a blocker.
- name: Create a draft release
uses: actions/create-release@v1
id: release
if: startsWith(github.ref, 'refs/tags')
env:
GITHUB_TOKEN: ${{ github.token }}
with:
draft: true
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
if: startsWith(github.ref, 'refs/tags')
- name: Docker Login
uses: docker/login-action@v2
if: startsWith(github.ref, 'refs/tags')
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags')
with:
version: 0.177.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ github.token }}
IMAGE_REPO: quay.io/operator-framework/olm
PKG: github.com/operator-framework/operator-lifecycle-manager
- name: Generate quickstart release manifests
if: startsWith(github.ref, 'refs/tags')
run: make release ver=${{ env.IMAGE_TAG }} IMAGE_REPO=quay.io/operator-framework/olm
- name: Update release artifacts with rendered Kubernetes release manifests
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags')
with:
name: ${{ env.IMAGE_TAG }}
files: |
deploy/upstream/quickstart/crds.yaml
deploy/upstream/quickstart/olm.yaml
deploy/upstream/quickstart/install.sh
draft: true
token: ${{ github.token }}