From def82dfca631edd4da33c43c3bc8434f3dc6d8f4 Mon Sep 17 00:00:00 2001 From: DevoTalk Date: Sun, 3 Mar 2024 20:35:18 +0330 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc9f439..42b919b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,16 +28,36 @@ jobs: run: dotnet build -c Release -f net8.0-android /p:AndroidSigningKeyStore=FastCfIPScanner.keystore /p:AndroidSigningKeyAlias=key /p:AndroidSigningKeyPass="${{ secrets.KEYSTORE_PASSWORD }}" /p:AndroidSigningStorePass="${{ secrets.KEYSTORE_PASSWORD_ALIAS }}" --no-restore - - name: Upload artifacts - uses: actions/upload-artifact@v3 + publish-release: + needs: build + runs-on: windows-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v2 with: - name: published-app - path: ./bin/Release/** - - - name: Create GitHub Release (if main branch) - if: github.ref == 'refs/heads/main' - uses: nilsfröhlich/actions-github-release@v3 + name: app-release + path: ./bin/Release/net8.0-android/publish/** + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v1.3 + release_name: Release v1.3.0 + body: | + test + draft: false + prerelease: true + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: "v1.3" # Use commit SHA for tag name - release_name: "test" - body: "**New Release:** Built and published from commit " + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./bin/Release/net8.0-android/publish/** + asset_name: FastCFIPScanner.zip + asset_content_type: application/zip