Skip to content

DOCUMENTATION: Add status badge #74

DOCUMENTATION: Add status badge

DOCUMENTATION: Add status badge #74

Workflow file for this run

name: Release
on:
push:
branches: [main, dev]
env:
BRANCH: "main"
RAYLIB_TAG: "4.5.0"
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
if: github.repository != 'EpitechPromo2026/B-CPP-500-TLS-5-1-rtype-xavier.mitault.git'
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
release-windows:
runs-on: windows-latest
needs: [release-create, raylib-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: ./scripts/install-deps-windows.ps1
- name: Build
run: ./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 }} ./r-type-windows.zip
gh release upload ${{ needs.release-create.outputs.release }} ./r-type-windows.exe
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-windows.zip
path: ./r-type-windows.zip
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-windows.exe
path: ./r-type-windows.exe
release-linux:
runs-on: ubuntu-latest
needs: [release-create, raylib-to-tar]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: sudo ./scripts/install-deps-linux.sh
- name: Build
run: ./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 }} ./r-type-linux.tar.gz
gh release upload ${{ needs.release-create.outputs.release }} ./r-type-linux.sh
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-linux.tar.gz
path: ./r-type-linux.tar.gz
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-linux.sh
path: ./r-type-linux.sh
release-macos:
runs-on: macos-latest
needs: [release-create, raylib-to-tar]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: ./scripts/install-deps-macos.sh
- name: Build
run: ./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 }} ./r-type-macos.zip
gh release upload ${{ needs.release-create.outputs.release }} ./r-type-macos.dmg
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-macos.dmg
path: ./r-type-macos.dmg
- name: Upload To Artifact
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: r-type-macos.zip
path: ./r-type-macos.zip
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 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