diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee06b9a302..babf14125b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,8 @@ on: tags: - '*' pull_request: + release: + types: [published] jobs: test: @@ -78,10 +80,20 @@ jobs: with: name: ${{ matrix.artifact }} path: scalafmt + - name: Upload release + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: scalafmt + asset_name: ${{ matrix.artifact }} + asset_content_type: application/zip dockerize: needs: [native-image,test] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && github.event_name != 'release' steps: - uses: actions/checkout@v2 - run: git fetch --unshallow