Skip to content

Commit

Permalink
Fix GH action to stage Ubuntu binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGautier committed Jul 17, 2024
1 parent d40c766 commit 3bd6604
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:

- name: Stage binaries
if: |
contains(matrix.os, 'latest') &&
contains(matrix.python-version, '3.9') &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
Expand All @@ -83,14 +82,14 @@ jobs:
- name: Push Linux & macOS binaries
if: |
(contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) &&
(contains(matrix.os, 'ubuntu') || matrix.os == 'macos-latest') &&
contains(matrix.python-version, '3.9') &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
run: |
git config --global user.name "${GH_USERNAME}"
git config --global user.email "${GH_USERNAME}@users.noreply.github.com"
git diff-index --quiet HEAD || { git commit -m "Add ${{ matrix.os }} binaries" && git pull && git push --allow-empty; }
git diff-index --quiet HEAD || { git commit -m "Add ${{ matrix.os }} binaries" && git pull && git push; }
# We use cmd /c because powershell <7 does not support chain operators.
- name: Push Windows binaries
Expand All @@ -102,4 +101,4 @@ jobs:
run: |
git config --global user.name "${{ env.GH_USERNAME }}"
git config --global user.email "${{ env.GH_USERNAME }}@users.noreply.github.com"
cmd /c 'git diff-index --quiet HEAD || ( git commit -m "Add ${{ matrix.os }} binaries" && git pull && git push --allow-empty )'
cmd /c 'git diff-index --quiet HEAD || ( git commit -m "Add ${{ matrix.os }} binaries" && git pull && git push )'

0 comments on commit 3bd6604

Please sign in to comment.