X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=.github%2Fworkflows%2Fstockfish.yml;h=e8db52351dd60ee024b6ed95eba5490e68c12658;hb=HEAD;hp=6345b27cb7424efda303423cf2e88e13e97a1abd;hpb=aa603cfeeb6e902bcf996758515170b996ec1fb6;p=stockfish diff --git a/.github/workflows/stockfish.yml b/.github/workflows/stockfish.yml index 6345b27c..e8db5235 100644 --- a/.github/workflows/stockfish.yml +++ b/.github/workflows/stockfish.yml @@ -1,6 +1,8 @@ name: Stockfish on: push: + tags: + - '*' branches: - master - tools @@ -10,6 +12,28 @@ on: - master - tools jobs: + Prerelease: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + # returns null if no pre-release exists + - name: Get Commit SHA of Latest Pre-release + run: | + # Install required packages + sudo apt-get update + sudo apt-get install -y curl jq + + echo "COMMIT_SHA=$(jq -r 'map(select(.prerelease)) | first | .tag_name' <<< $(curl -s https://api.github.com/repos/${{ github.repository_owner }}/Stockfish/releases))" >> $GITHUB_ENV + + # delete old previous pre-release and tag + - uses: dev-drprasad/delete-tag-and-release@8cd619d00037e4aeb781909c9a6b03940507d0da # @v1.0.1 + if: env.COMMIT_SHA != 'null' + with: + tag_name: ${{ env.COMMIT_SHA }} + github_token: ${{ secrets.GITHUB_TOKEN }} + + Analyzers: + uses: ./.github/workflows/stockfish_analyzers.yml Sanitizers: uses: ./.github/workflows/stockfish_sanitizers.yml Tests: @@ -17,8 +41,8 @@ jobs: Compiles: uses: ./.github/workflows/stockfish_compile_test.yml Binaries: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag') uses: ./.github/workflows/stockfish_binaries.yml ARM_Binaries: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag') uses: ./.github/workflows/stockfish_arm_binaries.yml