-
Notifications
You must be signed in to change notification settings - Fork 43
50 lines (42 loc) · 1.3 KB
/
odh-release.yml
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
# This workflow will compile e2e tests and release them
name: ODH Release
on:
workflow_dispatch:
inputs:
version:
description: 'Tag to be used for release, i.e.: v0.0.1'
required: true
jobs:
release-odh:
runs-on: ubuntu-latest
# Permission required to create a release
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- name: Verify that release doesn't exist yet
shell: bash {0}
run: |
gh release view ${{ github.event.inputs.version }}
status=$?
if [[ $status -eq 0 ]]; then
echo "Release ${{ github.event.inputs.version }} already exists."
exit 1
fi
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
- name: Compile tests
run: |
go test -c -o compiled-tests/kfto ./tests/kfto/core
go test -c -o compiled-tests/kfto-upgrade ./tests/kfto/upgrade
go test -c -o compiled-tests/odh ./tests/odh
- name: Creates a release in GitHub
run: |
gh release create ${{ github.event.inputs.version }} --target ${{ github.ref }} compiled-tests/*
env:
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
shell: bash