-
Notifications
You must be signed in to change notification settings - Fork 64
63 lines (51 loc) · 1.93 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
58
59
60
61
62
63
name: release-main
on:
push:
branches: [ "main" ]
permissions:
contents: read
env:
DOTNET_VERSION: '6.0.400'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
packages: 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 build provenance
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4
with:
subject-path: "${{ github.workspace }}/build/output/*.nupkg"
- name: Release to feedz.io
run: dotnet nuget push 'build/output/*.nupkg' -k ${{ secrets.FEEDZ_IO_API_KEY }} -s ${{ secrets.FEEDZ_IO_API_URL }} --skip-duplicate --no-symbols
- name: publish canary packages github package repository
shell: bash
timeout-minutes: 10
continue-on-error: true
run: |
until dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols -s https://nuget.pkg.github.com/elastic/index.json; do echo "Retrying"; sleep 1; done;
- name: Store artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: nupkg
path: build/output/*.nupkg
- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#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>)