CodeQL hotfix #11
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: MSYS2-wizmode | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
release: false | |
update: false | |
install: git mingw-w64-i686-gcc make mingw-w64-i686-cmake mingw-w64-i686-libpng mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixer | |
- name: Get tag name, print | |
shell: bash | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo $RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
- name: Build and install | |
run: | | |
cd D:/a/ivan/ivan | |
mkdir installation | |
mkdir build | |
cd build | |
cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=D:/a/ivan/ivan/installation -DWIZARD=ON | |
make VERBOSE=1 -j4 install | |
- name: Package | |
run: | | |
$FILE_VERSION = "IVAN-${{env.RELEASE_VERSION}}-win" | |
Compress-Archive -Path "D:\a\ivan\ivan\installation\ivan\*" -DestinationPath ${{ github.workspace }}\IvanWin.zip | |
Rename-Item -Path "${{ github.workspace }}\IvanWin.zip" -NewName "$FILE_VERSION.zip" | |
shell: pwsh | |
# Attention: you perform the release step when you push a tag, neat huh? | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{ github.workspace }}\*.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#GITHUB_REPOSITORY: attnam/ivan |