Skip to content

Release workflow fixes (#1148) #55

Release workflow fixes (#1148)

Release workflow fixes (#1148) #55

Workflow file for this run

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
contents: write
id-token: write
steps:
- name: Check out
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1
with:
cache: false
- name: Build
run: mise run build-release
env:
TAG: ${{ github.ref_name }}
- 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
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
draft: ${{ steps.get-release-actor-user-type.outputs.release-actor-user-type != 'Bot' }}
generate_release_notes: true
files: |
agent/build/libs/grafana-opentelemetry-java.jar
LICENSE
- name: Push to Docker (for OpenTelemetry Operator)
uses: grafana/shared-workflows/actions/push-to-gar-docker@dc66ed7a5dc1f49848b06068ae024e96e26d4761 # push-to-gar-docker/v0.5.2
with:
registry: "us-docker.pkg.dev"
image_name: grafana-opentelemetry-java
context: .
file: scripts/otel_operator/Dockerfile
tags: |
type=match,pattern=v(.*),group=1
latest
environment: "prod"
platforms: linux/amd64,linux/arm64