update readme and prepare for release #62
Workflow file for this run
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: build windows x86, x64 | |
on: | |
push: {tags: ['v*']} # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
permissions: | |
contents: write | |
jobs: | |
install_thirdparty_build: | |
runs-on: ubuntu-20.04 # default batch, powershell | |
steps: | |
- uses: actions/checkout@v3 | |
- name: check or download thirdparty_build cache | |
id: check_thirdparty_build | |
uses: actions/cache@v3 | |
with: | |
path: ./thirdparty | |
key: thirdparty_build | |
# this should be fixed to download the inital commit thirdparty | |
- name: download thirdparty_build | |
if: steps.check_thirdparty_build.outputs.cache-hit != 'true' | |
run: | | |
curl -fsSL https://github.com/YuriSizuku/OnscripterYuri/releases/download/v0.6/thirdparty_build.tar.gz -O | |
tar xvzf thirdparty_build.tar.gz | |
build_win32: | |
runs-on: ubuntu-20.04 | |
needs: install_thirdparty_build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get thirdparty_build cache | |
uses: actions/cache@v3 | |
with: | |
key: thirdparty_build | |
path: ./thirdparty | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
platform: x86 | |
- name: build onsyuri_x86_win.exe | |
run: | | |
cd script | |
export SKIP_PORTS=yes && bash ./cross_mingw32.sh | |
- name: prepare release | |
if: github.event_name == 'push' | |
run: | | |
cd build_mingw32 | |
mv onsyuri.exe onsyuri_${{ github.ref_name }}_x86_win.exe | |
- name: create release | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'push' | |
with: | |
artifacts: "./build_mingw32/onsyuri_${{ github.ref_name }}_x86_win.exe" | |
allowUpdates: "true" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build_win64: | |
runs-on: ubuntu-20.04 | |
needs: install_thirdparty_build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get thirdparty_build cache | |
uses: actions/cache@v3 | |
with: | |
key: thirdparty_build | |
path: ./thirdparty | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
platform: x64 | |
- name: build onsyuri_x64_win.exe | |
run: | | |
cd script | |
export SKIP_PORTS=yes && bash ./cross_mingw64.sh | |
- name: prepare release | |
if: github.event_name == 'push' | |
run: | | |
cd build_mingw64 | |
mv onsyuri.exe onsyuri_${{ github.ref_name }}_x64_win.exe | |
- name: create release | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'push' | |
with: | |
artifacts: "./build_mingw64/onsyuri_${{ github.ref_name }}_x64_win.exe" | |
allowUpdates: "true" | |
token: ${{ secrets.GITHUB_TOKEN }} |