From 7934ebc2cfbbd14326737dc124871950dae2df88 Mon Sep 17 00:00:00 2001 From: CassioJhones Date: Sun, 13 Oct 2024 23:08:47 -0300 Subject: [PATCH] fix build --- .github/workflows/dotnet-desktop.yml | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index a591bc9..43d0dde 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -1,4 +1,4 @@ -name: Compilação e Teste FolderFlex +name: Compilação, Publicação e Lançamento FolderFlex on: push: @@ -29,9 +29,6 @@ jobs: - name: Compilando Tudo run: dotnet build FolderFlex.sln --configuration ${{ matrix.configuration }} --no-restore - - name: Rodando Testes de unidade - run: dotnet test FolderFlexTeste/FolderFlexTeste.csproj --configuration ${{ matrix.configuration }} --no-build --verbosity normal - - name: Publicando FolderFlex run: dotnet publish FolderFlex/FolderFlex.csproj --configuration ${{ matrix.configuration }} --output ./output/ @@ -42,8 +39,31 @@ jobs: run: | powershell Compress-Archive -Path ./output/* -DestinationPath ./output/FolderFlex.zip - - name: Upload dos Artefatos - uses: actions/upload-artifact@v3 + - name: Criando uma tag para a versão + id: tag_version + run: | + # Define a nova versão da tag (pode ser adaptado conforme sua necessidade) + git tag v1.0.${{ github.run_number }} + # Faz o push da nova tag para o repositório remoto + git push origin v1.0.${{ github.run_number }} + + - name: Criando a nova release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: 5.0.${{ github.run_number }} + release_name: "FolderFlex v1.0.${{ github.run_number }}" + draft: false + prerelease: false + + - name: Anexando o artefato à release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Build Outputs - path: ./output/FolderFlex.zip + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./output/FolderFlex.zip + asset_name: FolderFlex.zip + asset_content_type: application/zip