diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa2764..723107c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,19 @@ jobs: ${{ env.VERSION }}.${{ env.ARTIFACT_EXTENSION }} VERSION + - name: Upload release artifacts + if: | + github.event_name == 'release' || + github.event_name == 'push' && github.ref_name == 'master' || + github.event_name == 'push' && startsWith(github.ref_name, 'release-v') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.VERSION }}.${{ env.ARTIFACT_EXTENSION }} + asset_name: build.${{ env.ARTIFACT_EXTENSION }} + tag: ${{ github.event.release.tag_name }} + overwrite: true + upload: runs-on: ubuntu-latest needs: [ ci ]