mic-code is updating mic-code/SourceGenTest🚀 #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Nuget | |
| run-name: ${{ github.actor }} is updating ${{ github.repository }}🚀 | |
| on: | |
| push: | |
| branches: | |
| - "release" | |
| jobs: | |
| create_nuget: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Pack | |
| run: dotnet pack SourceGen --configuration Release --output pack/ | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.event.repository.name }} | |
| if-no-files-found: error | |
| retention-days: 7 | |
| path: pack/*.nupkg | |
| - name: Publish Nuget | |
| run: | | |
| dotnet nuget push pack/*.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - uses: sarisia/actions-status-discord@v1 | |
| if: always() | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: ${{ job.status }} | |
| content: "" | |
| title: "New ${{ github.event.repository.name }} Build" | |
| description: "" | |
| color: ${{ job.status == 'Success' && '0x00ff00' || '0xff0000' }} | |
| url: "https://github.com/mic-code/${{ github.event.repository.name }}" | |
| username: GitHub Actions |