mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00

adds a guard to prevent pull requests from trying to delete the previous pre-release closing https://github.com/official-stockfish/Stockfish/pull/4631 No functional change.
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
name: Stockfish
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
branches:
|
|
- master
|
|
- tools
|
|
- github_ci
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- tools
|
|
jobs:
|
|
Prerelease:
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# 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@v0.2.1
|
|
if: env.COMMIT_SHA != 'null'
|
|
with:
|
|
tag_name: ${{ env.COMMIT_SHA }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
Sanitizers:
|
|
uses: ./.github/workflows/stockfish_sanitizers.yml
|
|
Tests:
|
|
uses: ./.github/workflows/stockfish_test.yml
|
|
Compiles:
|
|
uses: ./.github/workflows/stockfish_compile_test.yml
|
|
Binaries:
|
|
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' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
|
|
uses: ./.github/workflows/stockfish_arm_binaries.yml
|