From 68f8c5b8a073406cc56a31ff334dbd32e6b7ed71 Mon Sep 17 00:00:00 2001 From: Denis Danilov Date: Sun, 6 Nov 2022 14:53:54 +0100 Subject: [PATCH] create release from tag in ci --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6854f4c..ce3a433 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,3 +84,21 @@ jobs: with: name: '${{ env.INSTALL_PATH }}' path: ${{ env.INSTALL_PATH }}/* + - name: release archive + if: startsWith(github.ref, 'refs/tags/') + run: | + ZIP_PATH=${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.qt-arch }} + ZIP_FILE=$ZIP_PATH.zip + echo "ZIP_FILE=$ZIP_FILE" >>$GITHUB_ENV + mv ${{ env.INSTALL_PATH }} $ZIP_PATH + 7z a $ZIP_FILE $ZIP_PATH + - name: release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + ${{ env.ZIP_FILE }}