|
1 |
| -name: CI |
| 1 | +name: Common build |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: [main] |
6 |
| - pull_request: |
7 |
| - types: [opened, synchronize, reopened, labeled] |
8 |
| - branches: ["**"] |
9 | 4 | workflow_call:
|
10 | 5 |
|
11 | 6 | jobs:
|
@@ -244,52 +239,3 @@ jobs:
|
244 | 239 | with:
|
245 | 240 | name: agent-${{ matrix.os == 'arm-4core-linux-ubuntu24.04' && 'aarch64' || 'x86_64' }}
|
246 | 241 | path: otel-profiling-agent
|
247 |
| - |
248 |
| - publish: |
249 |
| - env: |
250 |
| - RELEASE_VERSION: ${{ github.event_name == 'pull_request' && 'dev-test' || 'dev' }} |
251 |
| - 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') )}} |
252 |
| - name: Publish pre-release |
253 |
| - needs: [build] |
254 |
| - runs-on: ubuntu-24.04 |
255 |
| - permissions: |
256 |
| - contents: write |
257 |
| - packages: write |
258 |
| - steps: |
259 |
| - - name: Download artifacts |
260 |
| - uses: actions/download-artifact@v4 |
261 |
| - - name: Create assets |
262 |
| - run: | |
263 |
| - tar czf otel-profiling-agent-${RELEASE_VERSION}-aarch64.tar.gz -C agent-aarch64 . |
264 |
| - tar czf otel-profiling-agent-${RELEASE_VERSION}-x86_64.tar.gz -C agent-x86_64 . |
265 |
| - sha256sum otel-profiling-agent-${RELEASE_VERSION}-aarch64.tar.gz otel-profiling-agent-${RELEASE_VERSION}-x86_64.tar.gz > sha256sums.txt |
266 |
| - - name: Create or move previous dev tag |
267 |
| - continue-on-error: true |
268 |
| - uses: actions/github-script@v7 |
269 |
| - with: |
270 |
| - script: | |
271 |
| - github.rest.git.createRef({ |
272 |
| - owner: context.repo.owner, |
273 |
| - repo: context.repo.repo, |
274 |
| - ref: 'refs/tags/${{ env.RELEASE_VERSION }}', |
275 |
| - sha: context.sha |
276 |
| - }).catch(err => { |
277 |
| - if (err.status !== 422) throw err; |
278 |
| - github.rest.git.updateRef({ |
279 |
| - owner: context.repo.owner, |
280 |
| - repo: context.repo.repo, |
281 |
| - ref: 'tags/${{ env.RELEASE_VERSION }}', |
282 |
| - sha: context.sha |
283 |
| - }) |
284 |
| - }); |
285 |
| - - name: Create pre-release |
286 |
| - uses: ncipollo/release-action@v1 |
287 |
| - with: |
288 |
| - artifacts: "otel-profiling-agent-${{ env.RELEASE_VERSION }}-*.tar.gz,sha256sums.txt" |
289 |
| - allowUpdates: true |
290 |
| - removeArtifacts: true |
291 |
| - omitBody: true |
292 |
| - omitDraftDuringUpdate: true |
293 |
| - prerelease: true |
294 |
| - draft: false |
295 |
| - tag: ${{ env.RELEASE_VERSION }} |
0 commit comments