Skip to content

Commit

Permalink
Deploy on release created, github upload butler #853
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed May 4, 2024
1 parent 62a5f24 commit 0c8a17a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@ jobs:
uses: softprops/action-gh-release@v1
if: >
startsWith(github.ref, 'refs/tags/') &&
(!startsWith(matrix.os, 'ubuntu') || (matrix.cc == 'gcc' && matrix.cc_version == 'latest'))
(!startsWith(matrix.os, 'ubuntu') || (matrix.cc == 'gcc' && matrix.cc_version == 'latest')) &&
github.event.release.created
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: C-Dogs*SDL-*-*.*
fail_on_unmatched_files: true

- name: Publish to itch.io (Linux)
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc' && matrix.cc_version == 'latest' && !github.event.release.prerelease
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc' && matrix.cc_version == 'latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
Expand All @@ -155,7 +156,7 @@ jobs:
./butler push C-Dogs*SDL-*-Linux.tar.gz congusbongus/cdogs-sdl:linux --userversion $VERSION
- name: Publish to itch.io (macOS)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-latest' && !github.event.release.prerelease
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
Expand All @@ -164,3 +165,10 @@ jobs:
chmod +x butler
./butler -V
./butler push C-Dogs*SDL-*-OSX.dmg congusbongus/cdogs-sdl:mac --userversion $VERSION
- name: Publish to itch.io (Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
.\build\windows\butler.bat
14 changes: 11 additions & 3 deletions .github/workflows/cmake.yml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@ jobs:
uses: softprops/action-gh-release@v1
if: >
startsWith(github.ref, 'refs/tags/') &&
(!startsWith(matrix.os, 'ubuntu') || (matrix.cc == 'gcc' && matrix.cc_version == 'latest'))
(!startsWith(matrix.os, 'ubuntu') || (matrix.cc == 'gcc' && matrix.cc_version == 'latest')) &&
github.event.release.created
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: C-Dogs*SDL-*-*.*
fail_on_unmatched_files: true

- name: Publish to itch.io (Linux)
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc' && matrix.cc_version == 'latest' && !github.event.release.prerelease
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc' && matrix.cc_version == 'latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
Expand All @@ -155,7 +156,7 @@ jobs:
./butler push C-Dogs*SDL-*-Linux.tar.gz congusbongus/cdogs-sdl:linux --userversion $VERSION

- name: Publish to itch.io (macOS)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-latest' && !github.event.release.prerelease
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
Expand All @@ -164,3 +165,10 @@ jobs:
chmod +x butler
./butler -V
./butler push C-Dogs*SDL-*-OSX.dmg congusbongus/cdogs-sdl:mac --userversion $VERSION

- name: Publish to itch.io (Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest' && github.event.release.created
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
.\build\windows\butler.bat
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ deploy:
appveyor_repo_tag: true

after_deploy:
- .\build\appveyor\butler.bat
- .\build\windows\butler.bat
2 changes: 1 addition & 1 deletion appveyor.yml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ deploy:
appveyor_repo_tag: true

after_deploy:
- .\build\appveyor\butler.bat
- .\build\windows\butler.bat
File renamed without changes.

0 comments on commit 0c8a17a

Please sign in to comment.