diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9417408c..4a555eea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,14 +24,6 @@ jobs: server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Build - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} - run: mvn -B package --file pom.xml -Pcoverage -Dsytle.colors=always --errors - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: Release # if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: samuelmeuli/action-maven-publish@v1 @@ -39,4 +31,13 @@ jobs: gpg_private_key: ${{ secrets.gpg_private_key }} gpg_passphrase: ${{ secrets.gpg_passphrase }} nexus_username: ${{ secrets.nexus_username }} - nexus_password: ${{ secrets.nexus_password }} \ No newline at end of file + nexus_password: ${{ secrets.nexus_password }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file