Skip to content

8.11.1

8.11.1 #13

Workflow file for this run

name: release
on:
release:
types: [published]
#push:
# tags: [ '[0-9]+.[0-9]+.[0-9]+.*' ]
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
issues: write
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap
- name: Generate local nuget packages
run: ./build.sh generatepackages -s true
- name: Validate *.npkg files that were created
run: ./build.sh validatepackages -s true
- name: Inspect public API change
run: ./build.sh generateapichanges -s true
- name: Generate release notes
run: ./build.sh generatereleasenotes -s true --token ${{ secrets.GITHUB_TOKEN }}
- name: Create or update release for tag on github
run: ./build.sh createreleaseongithub -s true --token ${{ secrets.GITHUB_TOKEN }}
- name: generate build provenance
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
with:
subject-path: "${{ github.workspace }}/build/output/*.nupkg"
- name: Prepare Nuget
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/apm-team/ci/elastic-observability-nuget apiKey | REPO_API_KEY ;
secret/apm-team/ci/elastic-observability-nuget url | REPO_API_URL
- name: Release to Nuget
run: dotnet nuget push 'build/output/*.nupkg' -k ${REPO_API_KEY} -s ${REPO_API_URL} --skip-duplicate --no-symbols
- name: Store artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: nupkg
path: build/output/*.nupkg
- if: ${{ success() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: "#apm-agent-dotnet"
message: |
:large_green_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* published.
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
- if: ${{ failure() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: "#apm-agent-dotnet"
message: |
:large_yellow_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* could not be published.
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)