-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (66 loc) · 2.41 KB
/
release.yml
File metadata and controls
78 lines (66 loc) · 2.41 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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions: {}
jobs:
release:
runs-on: ubuntu-24.04
timeout-minutes: 10
concurrency:
group: "${{ github.workflow }}-${{ github.sha }}"
cancel-in-progress: false
permissions:
actions: read
attestations: write
contents: write
id-token: write
steps:
- name: Check out
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: jdx/mise-action@c1ecc8f748cd28cdeabf76dab3cccde4ce692fe4 # v4.0.0
with:
version: v2026.3.8
sha256: 60ef9c2d9005ed4559cc8b1391056adf2c3b43d1065041640bbee854e5c4c9ee
cache: false
- name: Build
run: mise run build-release
env:
TAG: ${{ github.ref_name }}
- name: Attest artifacts
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: |
agent/build/libs/grafana-opentelemetry-java.jar
- name: Get release actor user type
id: get-release-actor-user-type
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$actorType = (gh api "repos/${env:GITHUB_REPOSITORY}/actions/workflows/publish-release.yml/runs" --jq '.workflow_runs[0].actor.type')
"release-actor-user-type=${actorType}" >> ${env:GITHUB_OUTPUT}
- name: Release
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_IS_DRAFT: ${{ steps.get-release-actor-user-type.outputs.release-actor-user-type != 'Bot' }}
run: |
gh release create "${GITHUB_REF_NAME}" "agent/build/libs/grafana-opentelemetry-java.jar" "LICENSE" "--draft=${RELEASE_IS_DRAFT}" --generate-notes --repo "${GITHUB_REPOSITORY}"
- name: Push to Docker (for OpenTelemetry Operator)
uses: grafana/shared-workflows/actions/docker-build-push-image@b3d136565946d8788dd6812881fb0fb2fe14bacb # docker-build-push-image/v0.2.0
with:
context: .
gar-environment: "prod"
gar-image: grafana-opentelemetry-java
gar-registry: "us-docker.pkg.dev"
file: scripts/otel_operator/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
registries: gar
tags: |
type=match,pattern=v(.*),group=1
latest