Skip to content

Commit 444cb86

Browse files
committed
test
1 parent d639d78 commit 444cb86

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/release-main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: release-main
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "test/provenance" ]
66

77
permissions:
88
attestations: write
@@ -36,12 +36,14 @@ jobs:
3636

3737
# Github packages requires authentication, this is likely going away in the future so for now we publish to feedz.io
3838
- name: publish canary packages to feedz.io
39+
if: startsWith(github.ref, 'refs/tags')
3940
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols
4041

4142
- name: publish canary packages github package repository
43+
if: startsWith(github.ref, 'refs/tags')
4244
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/elastic/index.json --skip-duplicate --no-symbols
4345

44-
- if: ${{ failure() }}
46+
- if: ${{ failure() && startsWith(github.ref, 'refs/tags') }}
4547
uses: elastic/oblt-actions/slack/[email protected]
4648
with:
4749
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: release
33
on:
44
release:
55
types: [published]
6+
push:
7+
branches: [ "test/provenance" ]
68

79
permissions:
810
contents: write
@@ -39,6 +41,7 @@ jobs:
3941
run: ./build.sh pack
4042

4143
- name: Release to Nuget
44+
if: startsWith(github.ref, 'refs/tags')
4245
run: .ci/linux/deploy.sh ${{ secrets.NUGET_API_KEY }} ${{ secrets.NUGET_API_URL }}
4346

4447
- name: Log in to the Elastic Container registry
@@ -56,7 +59,7 @@ jobs:
5659
cache-from: type=gha
5760
cache-to: type=gha,mode=max
5861
context: .
59-
push: true
62+
push: false
6063
tags: |
6164
${{ env.DOCKER_IMAGE }}:${{ steps.bootstrap.outputs.agent-version }}
6265
build-args: |
@@ -67,7 +70,7 @@ jobs:
6770
with:
6871
subject-name: ${{ env.DOCKER_IMAGE }}
6972
subject-digest: ${{ steps.docker-push.outputs.digest }}
70-
push-to-registry: true
73+
push-to-registry: false
7174

7275
- name: generate build provenance (APM Agent)
7376
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
@@ -80,13 +83,14 @@ jobs:
8083
subject-path: "${{ github.workspace }}/${{ env.PREFIX_APM_PROFILER }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_PROFILER }}"
8184

8285
- name: Attach Profiler And Startup Hooks
86+
if: startsWith(github.ref, 'refs/tags')
8387
continue-on-error: true #continue for now until we see it working in action
8488
env:
8589
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8690
run: |
8791
gh release upload ${{ github.ref_name }} "${{ env.PREFIX_APM_AGENT }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_AGENT }}" "${{ env.PREFIX_APM_PROFILER }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_PROFILER }}"
8892
89-
- if: ${{ success() }}
93+
- if: ${{ success() && startsWith(github.ref, 'refs/tags') }}
9094
uses: elastic/oblt-actions/slack/[email protected]
9195
with:
9296
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -96,7 +100,7 @@ jobs:
96100
Build: (<${{ env.JOB_URL }}|here>)
97101
Release URL: (<https://github.com/elastic/apm-agent-dotnet/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>)
98102
99-
- if: ${{ failure() }}
103+
- if: ${{ failure() && startsWith(github.ref, 'refs/tags') }}
100104
uses: elastic/oblt-actions/slack/[email protected]
101105
with:
102106
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -135,6 +139,7 @@ jobs:
135139
subject-path: "${{ github.workspace }}/${{ env.PREFIX_ZIP_FILE }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_ZIP_FILE }}"
136140

137141
- name: Attach Profiler
142+
if: startsWith(github.ref, 'refs/tags')
138143
env:
139144
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140145
continue-on-error: true #continue for now until we see it working in action
@@ -144,6 +149,7 @@ jobs:
144149
post-release:
145150
needs: [ 'release-windows']
146151
runs-on: ubuntu-latest
152+
if: startsWith(github.ref, 'refs/tags')
147153
env:
148154
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149155
GIT_TAG: v${{ needs.release-windows.outputs.agent-version }}

0 commit comments

Comments
 (0)