Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move release targets after container push
  • Loading branch information
Mpdreamz committed Sep 4, 2024
commit a21160694fb4a115a7f3c1582bf4518323277897
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,17 @@ jobs:

- name: List distributions
run: ls -al ${{ env.RELEASE_DISTRO }}

- name: Generate build provenance (Distribution)
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
with:
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' }}
run: dotnet nuget push '${{ env.RELEASE_PACKAGES }}' -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols

- name: Log in to the Elastic Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
Expand All @@ -79,7 +69,7 @@ jobs:
type=semver,pattern={{version}},value=${{ steps.bootstrap.outputs.agent-version }}
# "edge" Docker tag on git push to default branch
type=edge

- name: Build and Push Profiler Docker Image
id: docker-push
continue-on-error: true # continue for now until we see it working in action
Expand All @@ -101,6 +91,16 @@ jobs:
subject-digest: ${{ steps.docker-push.outputs.digest }}
push-to-registry: true

- 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' }}
run: dotnet nuget push '${{ env.RELEASE_PACKAGES }}' -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols

- if: ${{ success() && github.event_name == 'release' }}
uses: elastic/oblt-actions/slack/[email protected]
with:
Expand Down