@@ -3,6 +3,8 @@ name: release
3
3
on :
4
4
release :
5
5
types : [published]
6
+ push :
7
+ branches : [ "test/provenance" ]
6
8
7
9
permissions :
8
10
contents : write
39
41
run : ./build.sh pack
40
42
41
43
- name : Release to Nuget
44
+ if : startsWith(github.ref, 'refs/tags')
42
45
run : .ci/linux/deploy.sh ${{ secrets.NUGET_API_KEY }} ${{ secrets.NUGET_API_URL }}
43
46
44
47
- name : Log in to the Elastic Container registry
56
59
cache-from : type=gha
57
60
cache-to : type=gha,mode=max
58
61
context : .
59
- push : true
62
+ push : false
60
63
tags : |
61
64
${{ env.DOCKER_IMAGE }}:${{ steps.bootstrap.outputs.agent-version }}
62
65
build-args : |
67
70
with :
68
71
subject-name : ${{ env.DOCKER_IMAGE }}
69
72
subject-digest : ${{ steps.docker-push.outputs.digest }}
70
- push-to-registry : true
73
+ push-to-registry : false
71
74
72
75
- name : generate build provenance (APM Agent)
73
76
uses : actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
@@ -80,13 +83,14 @@ jobs:
80
83
subject-path : " ${{ github.workspace }}/${{ env.PREFIX_APM_PROFILER }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_PROFILER }}"
81
84
82
85
- name : Attach Profiler And Startup Hooks
86
+ if : startsWith(github.ref, 'refs/tags')
83
87
continue-on-error : true # continue for now until we see it working in action
84
88
env :
85
89
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86
90
run : |
87
91
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 }}"
88
92
89
- - if : ${{ success() }}
93
+ - if : ${{ success() && startsWith(github.ref, 'refs/tags') }}
90
94
uses :
elastic/oblt-actions/slack/[email protected]
91
95
with :
92
96
bot-token : ${{ secrets.SLACK_BOT_TOKEN }}
96
100
Build: (<${{ env.JOB_URL }}|here>)
97
101
Release URL: (<https://github.com/elastic/apm-agent-dotnet/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>)
98
102
99
- - if : ${{ failure() }}
103
+ - if : ${{ failure() && startsWith(github.ref, 'refs/tags') }}
100
104
uses :
elastic/oblt-actions/slack/[email protected]
101
105
with :
102
106
bot-token : ${{ secrets.SLACK_BOT_TOKEN }}
@@ -135,6 +139,7 @@ jobs:
135
139
subject-path : " ${{ github.workspace }}/${{ env.PREFIX_ZIP_FILE }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_ZIP_FILE }}"
136
140
137
141
- name : Attach Profiler
142
+ if : startsWith(github.ref, 'refs/tags')
138
143
env :
139
144
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140
145
continue-on-error : true # continue for now until we see it working in action
@@ -144,6 +149,7 @@ jobs:
144
149
post-release :
145
150
needs : [ 'release-windows']
146
151
runs-on : ubuntu-latest
152
+ if : startsWith(github.ref, 'refs/tags')
147
153
env :
148
154
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149
155
GIT_TAG : v${{ needs.release-windows.outputs.agent-version }}
0 commit comments