Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix artifact upload conflicts #801

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
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
45 changes: 43 additions & 2 deletions .github/workflows/publish-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,24 @@ jobs:
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: nupkg
name: nupkg-${{matrix.library}}
path: |
nuget-packages/*.nupkg
nuget-packages/*.snupkg

nuget-merge:
name: NuGet merge artifacts
runs-on: ubuntu-latest
needs: nuget-build

steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: nupkg
pattern: nupkg-*
delete-merged: true

npm-build:
name: NPM package build
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -105,7 +118,7 @@ jobs:
if: needs.preflight.outputs.dry-run == 'false'
needs:
- preflight
- nuget-build
- nuget-merge

steps:
- name: Download NuGet packages artifact
Expand Down Expand Up @@ -173,3 +186,31 @@ jobs:
Write-Host "Publishing $($File.Name)..."
./ci/npm-publish.ps1 -Tarball "$File" -Access 'public'
}

notify:
name: Notify failure
runs-on: ubuntu-latest
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }}
needs:
- npm-build
- nuget-merge
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ARCHITECTURE }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Send slack notification
id: slack
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.repository }}* :fire::fire::fire::fire::fire: \n The scheduled build for *${{ github.repository }}* is <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|broken>"
}
}
]
}
Comment on lines +190 to +216
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added the slack notification.