Skip to content

Commit

Permalink
Ajustado visualização Deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurício Bernardo committed Nov 21, 2024
1 parent 9302b63 commit f3a0197
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/DFe.NET_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ jobs:
if: github.event_name == 'push' || github.event.inputs.nugetdeploy == 'true'
runs-on: ${{ 'ubuntu-latest' }}
steps:
- name: Criar Deployment
id: create_deployment
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{
"ref": "${{ github.ref }}",
"environment": "NuGet",
"description": "Deploy de pacotes para o NuGet",
"required_contexts": []
}' \
https://api.github.com/repos/${{ github.repository }}/deployments
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -145,3 +159,17 @@ jobs:
uses: Ilshidur/action-discord@master
with:
args: 'Lançado Zeus DFe.NET versão {{ DISCORD_MENSAGEM }} no Nuget! Acesse: https://www.nuget.org/profiles/ZeusAutomacao'

- name: Atualizar Status do Deployment
if: success()
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{
"state": "success",
"environment": "NuGet",
"description": "Deploy concluído com sucesso.",
"log_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}' \
https://api.github.com/repos/${{ github.repository }}/deployments/${{ steps.create_deployment.outputs.id }}/statuses

0 comments on commit f3a0197

Please sign in to comment.