Skip to content

Correct spelling error in README.md #71

Correct spelling error in README.md

Correct spelling error in README.md #71

Workflow file for this run

name: Release Pipeline
on:
push:
tags:
- v*
permissions:
pages: write
id-token: write
contents: write
jobs:
release-windows:
name: Build and release for Windows
runs-on: windows-latest
steps:
- name: Install Glfw3
run: |
choco install cmake git
- name: Checkout code
uses: actions/checkout@v2
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$env:GITHUB_SHA")" >> "$env:GITHUB_ENV"
- name: Build and compile
run: |
mkdir build && cd build && cmake .. && cmake --build . --config Release
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/Release/json_x_glfw_opengl3-windows-amd64_${{ env.SHA_SHORT }}.exe
asset_name: json_x_glfw_opengl3-windows-amd64_${{ env.SHA_SHORT }}.exe
tag: ${{ github.ref }}
release-macos:
name: Build and release for MacOS
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Glfw3
run: |
brew install cmake
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Build and compile
run: |
mkdir build && cd build && cmake .. && make
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/json_x_glfw_opengl3-macos-arm64_${{ env.SHA_SHORT }}
asset_name: json_x_glfw_opengl3-macos-arm64_${{ env.SHA_SHORT }}
tag: ${{ github.ref }}
release-linux:
name: Build and release for Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Glfw3
run: |
sudo apt-get update
sudo apt-get install libegl1-mesa-dev libwayland-dev libxkbcommon-dev xorg-dev
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Build and compile
run: |
mkdir build && cd build && cmake .. && make
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/json_x_glfw_opengl3-linux-amd64_${{ env.SHA_SHORT }}
asset_name: json_x_glfw_opengl3-linux-amd64_${{ env.SHA_SHORT }}
tag: ${{ github.ref }}
web-build:
name: Web page build
needs: [release-linux, release-macos, release-windows]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Checkout to web branch
uses: actions/checkout@v2
with:
ref: web
- name: Compile HTML
run: |
export LINUX_DOWNLOAD_HREF=https://github.com/sithumonline/json_x/releases/download/${{ github.ref_name }}/json_x_glfw_opengl3-linux-amd64_${{ env.SHA_SHORT }}
export LINUX_DOWNLOAD=json_x_glfw_opengl3-linux-amd64_${{ env.SHA_SHORT }}
export MACOS_DOWNLOAD_HREF=https://github.com/sithumonline/json_x/releases/download/${{ github.ref_name }}/json_x_glfw_opengl3-macos-arm64_${{ env.SHA_SHORT }}
export MACOS_DOWNLOAD=json_x_glfw_opengl3-macos-arm64_${{ env.SHA_SHORT }}
export WINDOWS_DOWNLOAD_HREF=https://github.com/sithumonline/json_x/releases/download/${{ github.ref_name }}/json_x_glfw_opengl3-windows-amd64_${{ env.SHA_SHORT }}.exe
export WINDOWS_DOWNLOAD=json_x_glfw_opengl3-windows-amd64_${{ env.SHA_SHORT }}
sed -e "s#linux-download-href#$LINUX_DOWNLOAD_HREF#g" \
-e "s#linux-download#$LINUX_DOWNLOAD#g" \
-e "s#macos-download-href#$MACOS_DOWNLOAD_HREF#g" \
-e "s#macos-download#$MACOS_DOWNLOAD#g" \
-e "s#windows-download-href#$WINDOWS_DOWNLOAD_HREF#g" \
-e "s#windows-download#$WINDOWS_DOWNLOAD#g" \
index.html > temp.html
mv temp.html index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1