Repository navigation
127 lines (111 loc) · 4.2 KB
/
Copy pathrelease.yml
File metadata and controls
127 lines (111 loc) · 4.2 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: release
on:
push:
tags:
- "v*"
permissions:
id-token: write
contents: write
jobs:
release-tag:
runs-on: depot-ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Quill
env:
QUILL_TARBALL: quill_0.7.1_linux_amd64.tar.gz
QUILL_TARBALL_URL: https://github.com/anchore/quill/releases/download/v0.7.1/quill_0.7.1_linux_amd64.tar.gz
QUILL_CHECKSUMS_URL: https://github.com/anchore/quill/releases/download/v0.7.1/quill_0.7.1_checksums.txt
run: |
quill_dir="$(mktemp -d)"
trap 'rm -rf "${quill_dir}"' EXIT
curl -sSfL -o "${quill_dir}/${QUILL_TARBALL}" "${QUILL_TARBALL_URL}"
curl -sSfL -o "${quill_dir}/quill_checksums.txt" "${QUILL_CHECKSUMS_URL}"
(
cd "${quill_dir}"
grep "${QUILL_TARBALL}$" quill_checksums.txt | sha256sum --check -
tar -xzf "${QUILL_TARBALL}" quill
)
sudo install -m 0755 "${quill_dir}/quill" /usr/local/bin/quill
quill version
- name: Trigger providers repo tag workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TOOLS_DISPATCH_PAT }}
repository: obot-platform/providers
event-type: release
client-payload: '{"tag": "${{ github.ref_name }}"}'
- name: Trigger tools repo tag workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ENTERPRISE_TOOLS_DISPATCH_PAT }}
repository: obot-platform/enterprise-providers
event-type: release
client-payload: '{"tag": "${{ github.ref_name }}"}'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
# The binaries embed the LLM gateway's model data (see tools/fetch-model-data).
MODEL_DATA_URL: https://upgrade-server.obot.ai/v1/model-data
QUILL_SIGN_P12: ${{ secrets.QUILL_SIGN_P12 }}
QUILL_SIGN_PASSWORD: ${{ secrets.QUILL_SIGN_PASSWORD }}
QUILL_NOTARY_KEY: ${{ secrets.QUILL_NOTARY_KEY }}
QUILL_NOTARY_KEY_ID: ${{ secrets.QUILL_NOTARY_KEY_ID }}
QUILL_NOTARY_ISSUER: ${{ secrets.QUILL_NOTARY_ISSUER }}
winget-release:
needs: release-tag
if: "! contains(github.ref_name, '-')"
uses: ./.github/workflows/winget-release.yml
with:
tag: ${{ github.ref_name }}
secrets:
WINGET_GH_TOKEN: ${{ secrets.WINGET_GH_TOKEN }}
chart-release:
needs: release-tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Package Helm chart
run: helm package chart --destination ./.packaged --version ${{ github.ref_name }} --app-version ${{ github.ref_name }}
- name: Checkout GitHub Pages Repository
uses: actions/checkout@v4
with:
repository: obot-platform/charts
token: ${{ secrets.CHARTS_REPO_TOKEN }}
path: gh-pages
- name: Run helm-docs
uses: losisin/helm-docs-github-action@v1
with:
chart-search-root: "./chart"
output-file: "../gh-pages/README.md"
template-files: "../gh-pages/README.md.gotmpl"
- name: Update Helm Repo Index
run: |
cd gh-pages
mkdir -p charts
mv ../.packaged/* charts/
helm repo index . --url https://charts.obot.ai/ --merge index.yaml
- name: Commit and Push Changes
run: |
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add --all
git commit -m "Release new Helm chart version ${{ github.ref_name }}" || echo "No changes to commit"
git push