Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jun 6, 2024
1 parent d639d78 commit 444cb86
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release-main

on:
push:
branches: [ "main" ]
branches: [ "main", "test/provenance" ]

permissions:
attestations: write
Expand Down Expand Up @@ -36,12 +36,14 @@ jobs:

# Github packages requires authentication, this is likely going away in the future so for now we publish to feedz.io
- name: publish canary packages to feedz.io
if: startsWith(github.ref, 'refs/tags')
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols

- name: publish canary packages github package repository
if: startsWith(github.ref, 'refs/tags')
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/elastic/index.json --skip-duplicate --no-symbols

- if: ${{ failure() }}
- if: ${{ failure() && startsWith(github.ref, 'refs/tags') }}
uses: elastic/oblt-actions/slack/[email protected]
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: release
on:
release:
types: [published]
push:
branches: [ "test/provenance" ]

permissions:
contents: write
Expand Down Expand Up @@ -39,6 +41,7 @@ jobs:
run: ./build.sh pack

- name: Release to Nuget
if: startsWith(github.ref, 'refs/tags')
run: .ci/linux/deploy.sh ${{ secrets.NUGET_API_KEY }} ${{ secrets.NUGET_API_URL }}

- name: Log in to the Elastic Container registry
Expand All @@ -56,7 +59,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
push: true
push: false
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.bootstrap.outputs.agent-version }}
build-args: |
Expand All @@ -67,7 +70,7 @@ jobs:
with:
subject-name: ${{ env.DOCKER_IMAGE }}
subject-digest: ${{ steps.docker-push.outputs.digest }}
push-to-registry: true
push-to-registry: false

- name: generate build provenance (APM Agent)
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
Expand All @@ -80,13 +83,14 @@ jobs:
subject-path: "${{ github.workspace }}/${{ env.PREFIX_APM_PROFILER }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_PROFILER }}"

- name: Attach Profiler And Startup Hooks
if: startsWith(github.ref, 'refs/tags')
continue-on-error: true #continue for now until we see it working in action
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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 }}"
- if: ${{ success() }}
- if: ${{ success() && startsWith(github.ref, 'refs/tags') }}
uses: elastic/oblt-actions/slack/[email protected]
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand All @@ -96,7 +100,7 @@ jobs:
Build: (<${{ env.JOB_URL }}|here>)
Release URL: (<https://github.com/elastic/apm-agent-dotnet/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>)
- if: ${{ failure() }}
- if: ${{ failure() && startsWith(github.ref, 'refs/tags') }}
uses: elastic/oblt-actions/slack/[email protected]
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down Expand Up @@ -135,6 +139,7 @@ jobs:
subject-path: "${{ github.workspace }}/${{ env.PREFIX_ZIP_FILE }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_ZIP_FILE }}"

- name: Attach Profiler
if: startsWith(github.ref, 'refs/tags')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true #continue for now until we see it working in action
Expand All @@ -144,6 +149,7 @@ jobs:
post-release:
needs: [ 'release-windows']
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_TAG: v${{ needs.release-windows.outputs.agent-version }}
Expand Down

0 comments on commit 444cb86

Please sign in to comment.