Skip to content

Commit 7dbc408

Browse files
authored
Dont upload artifacts on each commit to main (#136)
See: https://github.com/elastic/elastic-otel-dotnet/actions/runs/10185795296 Since the zips are 50megs total this will get excessive quick This also guards that we only upload to a release when we are publishing a release. Hopefully this will fix the glob issue here too: https://github.com/elastic/elastic-otel-dotnet/actions/runs/10185795294/job/28176108962
1 parent 28ec302 commit 7dbc408

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

.github/workflows/prerelease.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
- run: ./build.sh release -c
3333
name: Release
3434

35-
- uses: actions/upload-artifact@v4
36-
with:
37-
name: elastic-distribution
38-
path: ${{ env.RELEASE_DISTRO }}
39-
4035
- name: Generate build provenance (Distribution)
4136
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
4237
with:
@@ -47,7 +42,6 @@ jobs:
4742
with:
4843
subject-path: "${{ github.workspace }}/${{ env.RELEASE_PACKAGES }}"
4944

50-
5145
# Push to feedz.io
5246
- name: publish canary packages to feedz.io
5347
run: dotnet nuget push '${{ env.RELEASE_PACKAGES }}' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,22 @@ jobs:
3535
- run: ./build.sh release
3636
name: Release
3737

38-
- name: Attach Distribution to release
39-
env:
40-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
run: |
42-
gh release upload ${{ github.ref_name }} "${{ env.RELEASE_DISTRO }}"
43-
4438
- name: Generate build provenance (Distribution)
4539
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
4640
with:
47-
subject-path: "${{ github.workspace }}/${{ env.RELASE_DISTRO }}"
41+
subject-path: "${{ github.workspace }}/${{ env.RELEASE_DISTRO }}"
4842

4943
- name: Generate build provenance (Packages)
5044
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
5145
with:
5246
subject-path: "${{ github.workspace }}/${{ env.RELEASE_PACKAGES }}"
47+
48+
- name: Attach Distribution to release
49+
if: ${{ github.event_name == 'release' }}
50+
env:
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
run: |
53+
gh release upload ${{ github.ref_name }} '${{ env.RELEASE_DISTRO }}'
5354
5455
- name: Release to Nuget (only for release events)
5556
if: ${{ github.event_name == 'release' }}

build/scripts/Packaging.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ let stageInstrumentationScript (stagedZips:List<ReleaseAsset * FileInfo>) =
129129
let wrapperScript = downloadFileInfo "instrument.sh"
130130
let copyScript = Path.Combine("src", "Elastic.OpenTelemetry.AutoInstrumentation", "instrument.sh") |> FileInfo
131131
let script = copyScript.CopyTo(wrapperScript.FullName, true)
132-
(stageVersion, script)
132+
(stageScript, script)
133133

134134
let stageInstallationBashScript () =
135135
let installScript = downloadFileInfo "otel-dotnet-auto-install.sh"

0 commit comments

Comments
 (0)