Skip to content

Commit

Permalink
Make sure that pre-release is not draft and correctly update dev tag (
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavoire authored and Gandem committed Jun 26, 2024
1 parent daeb0d0 commit 54a7ef4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,24 @@ jobs:
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 .
- name: Delete previous dev tag
- name: Create or move previous dev tag
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
github.rest.git.deleteRef({
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/${{ env.RELEASE_VERSION }}',
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
Expand All @@ -161,5 +170,7 @@ jobs:
allowUpdates: true
removeArtifacts: true
omitBody: true
omitDraftDuringUpdate: true
prerelease: true
draft: false
tag: ${{ env.RELEASE_VERSION }}

0 comments on commit 54a7ef4

Please sign in to comment.