Skip to content

Do not use deprecated GitHub commands in actions #87

Do not use deprecated GitHub commands in actions

Do not use deprecated GitHub commands in actions #87

Workflow file for this run

name: Build
on:
push:
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake libsdl2-dev libsdl2-ttf-dev
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=Release .
make
strip --strip-unneeded laserkombat
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: laserkombat-linux
path: |
laserkombat
assets
COPYING
Windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-binutils
mingw-w64-x86_64-make
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL2_ttf
update: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .
cmake --build .
strip --strip-unneeded laserkombat.exe
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: laserkombat-windows
path: |
laserkombat.exe
assets
COPYING
Release:
needs: [Linux, Windows]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
build: [linux, windows]
steps:
- uses: actions/download-artifact@v2
- name: Zip artifacts
run: |
zip -r laserkombat-${{matrix.build}}.zip laserkombat-${{matrix.build}}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: laserkombat-${{matrix.build}}.zip
tag_name: ${{ github.ref_name }}
name: Laser Kombat Revised version ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}