add more confirm popups #484
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: Deploy | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
build-web: | |
name: Build (Web) | |
runs-on: ubuntu-latest | |
container: ghcr.io/geng-engine/cargo-geng | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo geng build --release --platform web | |
env: | |
LEADERBOARD_URL: ${{ secrets.LEADERBOARD_URL }} | |
LEADERBOARD_KEY: ${{ secrets.LEADERBOARD_KEY }} | |
- name: Upload artifacts (web) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web | |
path: target/geng | |
build-native: | |
name: Build (Native) | |
runs-on: ${{ matrix.platform.runs-on }} | |
strategy: | |
matrix: | |
platform: | |
- runs-on: ubuntu-latest | |
channel: linux | |
- runs-on: macos-latest | |
channel: mac | |
- runs-on: windows-latest | |
channel: windows | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install things | |
if: matrix.platform.channel == 'linux' | |
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
- name: Install cargo-geng | |
run: cargo install cargo-geng --git https://github.com/geng-engine/cargo-geng --rev b2655fd973409f990e7967b37ce8a349b44eda31 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: geng | |
args: build --release | |
env: | |
LEADERBOARD_URL: ${{ secrets.LEADERBOARD_URL }} | |
LEADERBOARD_KEY: ${{ secrets.LEADERBOARD_KEY }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.platform.channel }} | |
path: target/geng | |
deploy-pages: | |
name: Deploy Github Pages | |
if: github.ref == 'refs/heads/main' && github.repository_owner == 'nertsal' | |
runs-on: ubuntu-latest | |
needs: | |
- build-web | |
permissions: | |
contents: write | |
environment: | |
name: main | |
url: https://nertsal.github.io/close-to-light | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Deploy GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: web | |
deploy-pages-dev: | |
name: Deploy Github Pages (dev) | |
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nertsal' | |
runs-on: ubuntu-latest | |
needs: | |
- build-web | |
permissions: | |
contents: write | |
environment: | |
name: dev | |
url: https://nertsal.github.io/close-to-light/dev | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Deploy GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: web | |
destination_dir: dev | |
deploy-itch: | |
name: Deploy Itch | |
if: github.ref == 'refs/heads/main' && github.repository_owner == 'nertsal' | |
runs-on: ubuntu-latest | |
needs: | |
- build-web | |
- build-native | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload itch.io (Web) | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: html5 | |
ITCH_GAME: close-to-light | |
ITCH_USER: nertsal | |
PACKAGE: web | |
- name: Upload itch.io (Windows) | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: windows | |
ITCH_GAME: close-to-light | |
ITCH_USER: nertsal | |
PACKAGE: windows | |
- name: Upload itch.io (Linux) | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: linux | |
ITCH_GAME: close-to-light | |
ITCH_USER: nertsal | |
PACKAGE: linux | |
- name: Upload itch.io (MacOS) | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: mac | |
ITCH_GAME: close-to-light | |
ITCH_USER: nertsal | |
PACKAGE: mac |