-
Notifications
You must be signed in to change notification settings - Fork 209
57 lines (47 loc) · 1.94 KB
/
release-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: release-main
on:
push:
branches: [ "main" ]
permissions:
contents: write
issues: write
packages: write
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
id: bootstrap
uses: ./.github/workflows/bootstrap
with:
rust: 'true'
- name: Package with canary suffix
run: ./build.sh pack
- name: Prepare feedz.io
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-feedz.io apiKey | REPO_API_KEY ;
secret/apm-team/ci/elastic-observability-feedz.io url | REPO_API_URL
# 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
run: dotnet nuget push 'build/output/_packages/*.nupkg' -k ${REPO_API_KEY} -s ${REPO_API_URL} --skip-duplicate --no-symbols
- name: publish canary packages github package repository
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() }}
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 }}] Snapshot could not be published to feedz.io.
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)