Fix curl #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [main, dev] | |
env: | |
BRANCH: "main" | |
DATE_TAG: "v3.0.1" | |
RAYLIB_TAG: "5.0" | |
RAYLIB_CPP_TAG: "v5.0.2" | |
ENET_TAG: "v2.3.10" | |
jobs: | |
release-create: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
outputs: | |
release: ${{ steps.release.outputs.release_tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: release | |
name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then | |
export GITHUB_OUTPUT=$GITHUB_OUTPUT | |
bash ./.github/workflows/release.sh "${{ env.BRANCH }}" | |
else | |
echo "release_tag=0.0.0" >> $GITHUB_OUTPUT | |
fi | |
date-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git | |
- name: Get Date | |
run: | | |
git clone https://github.com/HowardHinnant/date.git date-repo | |
cd date-repo || exit 14 | |
git checkout ${{ env.DATE_TAG }} | |
cd .. | |
- name: To Tar | |
run: | | |
tar -cvf date.tar date-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./date.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: date.tar | |
path: ./date.tar | |
enet-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git curl | |
- name: Get Date | |
run: | | |
mkdir enet-repo | |
mkdir enet-repo/include | |
curl -Lo enet-repo/include/enet.h "https://github.com/zpl-c/enet/releases/download/${{ env.ENET_TAG }}/enet.h" | |
- name: To Tar | |
run: | | |
tar -cvf enet.tar enet-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./enet.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: enet.tar | |
path: ./enet.tar | |
raylib-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git | |
- name: Get Raylib | |
run: | | |
git clone --recurse-submodules https://github.com/raysan5/raylib.git raylib-repo | |
cd raylib-repo || exit 14 | |
git checkout ${{ env.RAYLIB_TAG }} | |
cd .. | |
- name: To Tar | |
run: | | |
tar -cvf raylib.tar raylib-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./raylib.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: raylib.tar | |
path: ./raylib.tar | |
raylibcpp-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git | |
- name: Get RaylibCPP | |
run: | | |
git clone https://github.com/RobLoach/raylib-cpp.git raylib-cpp-repo | |
cd raylib-cpp-repo || exit 14 | |
git checkout ${{ env.RAYLIB_CPP_TAG }} | |
cd .. | |
- name: To Tar | |
run: | | |
tar -cvf raylib-cpp.tar raylib-cpp-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./raylib-cpp.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: raylib-cpp.tar | |
path: ./raylib-cpp.tar | |
release-client-windows: | |
runs-on: windows-latest | |
needs: [release-create, date-to-tar, raylib-to-tar, raylibcpp-to-tar] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install winget | |
uses: Cyberboss/install-winget@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
cd client | |
./scripts/install-deps-windows.ps1 | |
- name: Build | |
run: | | |
cd client | |
./scripts/bundle-windows.ps1 | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-windows.zip | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-windows.exe | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-windows.zip | |
path: ./client/Colomb-windows.zip | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-windows.exe | |
path: ./client/Colomb-windows.exe | |
release-client-linux: | |
runs-on: ubuntu-latest | |
needs: [release-create, date-to-tar, raylib-to-tar, raylibcpp-to-tar] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
cd client | |
sudo ./scripts/install-deps-linux.sh | |
- name: Build | |
run: | | |
cd client | |
./scripts/bundle-linux.sh | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-linux.tar.gz | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-linux.sh | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-linux.tar.gz | |
path: ./client/Colomb-linux.tar.gz | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-linux.sh | |
path: ./client/Colomb-linux.sh | |
release-client-macos: | |
runs-on: macos-latest | |
needs: [release-create, date-to-tar, raylib-to-tar, raylibcpp-to-tar] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
cd client | |
./scripts/install-deps-macos.sh | |
- name: Build | |
run: | | |
cd client | |
./scripts/bundle-macos.sh | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-macos.zip | |
gh release upload ${{ needs.release-create.outputs.release }} ./client/Colomb-macos.dmg | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-macos.dmg | |
path: ./client/Colomb-macos.dmg | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Colomb-macos.zip | |
path: ./client/Colomb-macos.zip |