mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 12:07:43 +00:00
create prereleases upon push to master
using github actions, create a prerelease for the latest commit to master. As such a development version will be available on github, in addition to the latest release. closes https://github.com/official-stockfish/Stockfish/pull/4622 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
a46087ee30
commit
a68a1c1154
@@ -129,4 +129,30 @@ jobs:
|
||||
if: startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: stockfish-android-${{ matrix.binaries }}.tar
|
||||
|
||||
- name: Get last commit sha
|
||||
id: last_commit
|
||||
run: echo "COMMIT_SHA=$(git rev-parse HEAD | cut -c 1-8)" >> $GITHUB_ENV
|
||||
|
||||
- name: Get commit date
|
||||
id: commit_date
|
||||
run: echo "COMMIT_DATE=$(git show -s --date=format:'%Y%m%d' --format=%cd HEAD)" >> $GITHUB_ENV
|
||||
|
||||
# Make sure that an old ci which still runs on master doesn't recreate a prerelease
|
||||
- name: Check Pullable Commits
|
||||
id: check_commits
|
||||
run: |
|
||||
git fetch
|
||||
CHANGES=$(git rev-list HEAD..origin/master --count)
|
||||
echo "CHANGES=$CHANGES" >> $GITHUB_ENV
|
||||
|
||||
- name: Prerelease
|
||||
if: github.ref_name == 'master' && env.CHANGES == '0'
|
||||
continue-on-error: true
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: Stockfish dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }}
|
||||
tag_name: stockfish-dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }}
|
||||
prerelease: true
|
||||
files: stockfish-android-${{ matrix.binaries }}.tar
|
||||
Reference in New Issue
Block a user