From 770c8027632b73104a39a5b94b2582d7338b0170 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 4 Nov 2023 13:24:19 +0100 Subject: [PATCH] Automatically upload artifacts to releases --- .github/workflows/ci.yaml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6982f76e..35dad677 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,11 +2,13 @@ name: ci on: push: - branches: [ "main" ] + branches: + - "main" tags: - - v* + - "v*.*.*" pull_request: - branches: [ "main" ] + branches: + - "main" env: PREMAKE_VERSION: "5.0.0-beta2" @@ -94,4 +96,23 @@ jobs: with: name: oat-windows path: | - ${{ github.workspace }}/build/bin/Release_x86 \ No newline at end of file + ${{ github.workspace }}/build/bin/Release_x86 + + release: + if: startsWith(github.ref, 'refs/tags/') + needs: + - build-test-linux + - build-test-windows + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + - uses: ncipollo/release-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + artifacts: "*.zip" + artifactErrorsFailBuild: true + allowUpdates: true + draft: true + omitBodyDuringUpdate: true + omitDraftDuringUpdate: true \ No newline at end of file