-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (59 loc) · 2.14 KB
/
go-sdk-tag.yml
File metadata and controls
67 lines (59 loc) · 2.14 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
name: Tag Go SDK modules
on:
workflow_dispatch:
inputs:
version:
description: 'Version to tag (e.g. 0.2.0)'
required: true
type: string
permissions:
contents: write
jobs:
tag:
if: github.repository == 'grafana/sigil-sdk' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Get secrets from Vault
id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@f1614b210386ac420af6807a997ac7f6d96e477a # get-vault-secrets/v1.3.1
env:
VAULT_INSTANCE: ops
with:
vault_instance: ${{ env.VAULT_INSTANCE }}
common_secrets: |
GITHUB_APP_ID=plugins-platform-bot-app:app-id
GITHUB_APP_PRIVATE_KEY=plugins-platform-bot-app:private-key
export_env: false
- name: Generate GitHub token
id: generate-github-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_ID }}
private-key: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.generate-github-token.outputs.token }}
persist-credentials: true
- name: Setup Git
run: |
git config user.name 'grafana-plugins-platform-bot[bot]'
git config user.email '144369747+grafana-plugins-platform-bot[bot]@users.noreply.github.com'
- name: Tag all Go modules
env:
INPUT_VERSION: ${{ inputs.version }}
run: |
VERSION="v${INPUT_VERSION}"
MODULES=(
go
go-providers/anthropic
go-providers/openai
go-providers/gemini
go-frameworks/google-adk
)
for mod in "${MODULES[@]}"; do
TAG="${mod}/${VERSION}"
echo "Tagging ${TAG}"
git tag -a "${TAG}" -m "${mod} ${VERSION}"
done
git push origin --tags