Skip to content

Commit

Permalink
Dont upload artifacts on each commit to main (#136)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mpdreamz committed Aug 1, 2024
1 parent 28ec302 commit 7dbc408
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
- run: ./build.sh release -c
name: Release

- uses: actions/upload-artifact@v4
with:
name: elastic-distribution
path: ${{ env.RELEASE_DISTRO }}

- name: Generate build provenance (Distribution)
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
with:
Expand All @@ -47,7 +42,6 @@ jobs:
with:
subject-path: "${{ github.workspace }}/${{ env.RELEASE_PACKAGES }}"


# Push to feedz.io
- name: publish canary packages to feedz.io
run: dotnet nuget push '${{ env.RELEASE_PACKAGES }}' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,22 @@ jobs:
- run: ./build.sh release
name: Release

- name: Attach Distribution to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} "${{ env.RELEASE_DISTRO }}"
- name: Generate build provenance (Distribution)
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
with:
subject-path: "${{ github.workspace }}/${{ env.RELASE_DISTRO }}"
subject-path: "${{ github.workspace }}/${{ env.RELEASE_DISTRO }}"

- name: Generate build provenance (Packages)
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
with:
subject-path: "${{ github.workspace }}/${{ env.RELEASE_PACKAGES }}"

- name: Attach Distribution to release
if: ${{ github.event_name == 'release' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} '${{ env.RELEASE_DISTRO }}'
- name: Release to Nuget (only for release events)
if: ${{ github.event_name == 'release' }}
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Packaging.fs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let stageInstrumentationScript (stagedZips:List<ReleaseAsset * FileInfo>) =
let wrapperScript = downloadFileInfo "instrument.sh"
let copyScript = Path.Combine("src", "Elastic.OpenTelemetry.AutoInstrumentation", "instrument.sh") |> FileInfo
let script = copyScript.CopyTo(wrapperScript.FullName, true)
(stageVersion, script)
(stageScript, script)

let stageInstallationBashScript () =
let installScript = downloadFileInfo "otel-dotnet-auto-install.sh"
Expand Down

0 comments on commit 7dbc408

Please sign in to comment.