From 9600b0493e9195991cbec041a3a55e8f6baa7afa Mon Sep 17 00:00:00 2001 From: liangzhuohua Date: Wed, 19 Jun 2024 14:55:52 +0800 Subject: [PATCH] TEST CI --- .github/workflows/msbuild.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 2c2d626..a165f95 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -8,6 +8,8 @@ name: MSBuild on: push: branches: [ "main" ] + tags: + - '*' pull_request: branches: [ "main" ] @@ -69,3 +71,27 @@ jobs: with: name: fpv4win path: build/Release/ + + - name: Create release + if: startsWith(github.ref, 'refs/tags/') + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + files: | + fpv4win.zip + + - name: Upload release asset + if: startsWith(github.ref, 'refs/tags/') + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: fpv4win.zip + asset_name: fpv4win + asset_content_type: application/octet-stream \ No newline at end of file