[PROF-10953] feat: Add GoPCLnTab support as SymbolSource #238
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["**"] | |
workflow_call: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
versions: | |
name: Determine versions | |
runs-on: ubuntu-24.04 | |
env: | |
RELEASE_VERSION: ${{ (github.ref_name == 'main' && 'dev') || (github.event_name != 'pull_request' && github.ref_name) || github.head_ref }} | |
outputs: | |
go-version: ${{ steps.go-version.outputs.version }} | |
profiler-version: ${{ steps.profiler-version.outputs.version }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Get Go version from go.mod file | |
id: go-version | |
run: echo "version=$(go mod edit -json | jq -r .Go)" >> "${GITHUB_OUTPUT}" | |
- name: Compute profiler version | |
id: profiler-version | |
run: echo "version=${RELEASE_VERSION}-${GITHUB_SHA::7}.${{ github.run_id }}" >> "${GITHUB_OUTPUT}" | |
build: | |
name: Build | |
needs: [versions] | |
uses: ./.github/workflows/build.yml | |
with: | |
go-version: ${{ needs.versions.outputs.go-version }} | |
profiler-version: ${{ needs.versions.outputs.profiler-version }} | |
secrets: inherit | |
permissions: | |
contents: read | |
pull-requests: write | |
publish: | |
env: | |
RELEASE_VERSION: ${{ github.event_name == 'pull_request' && 'dev-test' || 'dev' }} | |
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'publish-dev-test') )}} | |
name: Publish pre-release | |
needs: [build] | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
- name: Create assets | |
run: | | |
tar czf dd-otel-host-profiler-${RELEASE_VERSION}-aarch64.tar.gz -C agent-aarch64 . | |
tar czf dd-otel-host-profiler-${RELEASE_VERSION}-x86_64.tar.gz -C agent-x86_64 . | |
sha256sum dd-otel-host-profiler-${RELEASE_VERSION}-aarch64.tar.gz dd-otel-host-profiler-${RELEASE_VERSION}-x86_64.tar.gz > sha256sums.txt | |
- name: Create or move previous dev tag | |
continue-on-error: true | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: 'refs/tags/${{ env.RELEASE_VERSION }}', | |
sha: context.sha | |
}).catch(err => { | |
if (err.status !== 422) throw err; | |
github.rest.git.updateRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: 'tags/${{ env.RELEASE_VERSION }}', | |
sha: context.sha | |
}) | |
}); | |
- name: Create pre-release | |
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 | |
with: | |
artifacts: "dd-otel-host-profiler-${{ env.RELEASE_VERSION }}-*.tar.gz,sha256sums.txt" | |
allowUpdates: true | |
removeArtifacts: true | |
omitBody: true | |
omitDraftDuringUpdate: true | |
prerelease: true | |
draft: false | |
tag: ${{ env.RELEASE_VERSION }} |