Skip to content

README: add more comprehensive instructions for running the agent (#59) #11

README: add more comprehensive instructions for running the agent (#59)

README: add more comprehensive instructions for running the agent (#59) #11

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
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@v4
- name: Create assets
run: |
tar czf otel-profiling-agent-${RELEASE_VERSION}-aarch64.tar.gz -C agent-aarch64 .
tar czf otel-profiling-agent-${RELEASE_VERSION}-x86_64.tar.gz -C agent-x86_64 .
sha256sum otel-profiling-agent-${RELEASE_VERSION}-aarch64.tar.gz otel-profiling-agent-${RELEASE_VERSION}-x86_64.tar.gz > sha256sums.txt
- name: Create or move previous dev tag
continue-on-error: true
uses: actions/github-script@v7
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@v1
with:
artifacts: "otel-profiling-agent-${{ env.RELEASE_VERSION }}-*.tar.gz,sha256sums.txt"
allowUpdates: true
removeArtifacts: true
omitBody: true
omitDraftDuringUpdate: true
prerelease: true
draft: false
tag: ${{ env.RELEASE_VERSION }}