Skip to content

Itch release

Itch release #98

Workflow file for this run

name: Windows
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- '.github/workflows/windows.yml'
- 'mingw.cmake'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
env:
PROJECT_NAME: ${{ github.event.repository.name }}
PROJECT_RELEASE_PATH: ${{ github.event.repository.name }}_dev_windows_x64
steps:
- name: Checkout this repo
uses: actions/checkout@master
with:
path: ${{ env.PROJECT_NAME }}
- name: Setup Release Paths
run: |
echo "PROJECT_RELEASE_PATH=${{ env.PROJECT_NAME }}_${{ github.event.release.tag_name }}_windows_x64" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends cmake mingw-w64
mkdir ${{ env.PROJECT_RELEASE_PATH }}
ls
shell: bash
- name: Build Product
run: |
cd ${{ env.PROJECT_NAME }}
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=mingw.cmake
cmake --build build
- name: Generate Artifacts
run: |
ls ${{ env.PROJECT_NAME }}
cp -v ${{ env.PROJECT_NAME }}/build/${{ env.PROJECT_NAME }}.exe ${{ env.PROJECT_RELEASE_PATH }}
cp -var ${{ env.PROJECT_NAME }}/assets ${{ env.PROJECT_RELEASE_PATH }}
cp -v ${{ env.PROJECT_NAME }}/README.md ${{ env.PROJECT_RELEASE_PATH }}
cp -v ${{ env.PROJECT_NAME }}/LICENSE ${{ env.PROJECT_RELEASE_PATH }}
ls ${{ env.PROJECT_RELEASE_PATH }}
# 7z a ./${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.PROJECT_RELEASE_PATH }}
path: ./${{ env.PROJECT_RELEASE_PATH }}