Merge pull request #21 from lionello/github-action2 #10
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 | |
on: | |
push: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu, windows, macos] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build (GCC) | |
if: matrix.os != 'windows' | |
run: ./mk | |
- uses: ilammy/msvc-dev-cmd@v1 | |
if: matrix.os == 'windows' | |
- name: Build (Windows) | |
if: matrix.os == 'windows' | |
shell: cmd | |
run: mk.bat | |
- name: Zip (Linux, macOS) | |
if: matrix.os != 'windows' | |
run: zip fart-${{ matrix.os }}.zip fart | |
- name: Zip (Windows) | |
if: matrix.os == 'windows' | |
run: Compress-Archive -Path fart.exe -Destination fart-${{ matrix.os }}.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: fart-*.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: fart-${{ matrix.os }}.zip | |
generate_release_notes: true | |
append_body: true |