Skip to content

Commit

Permalink
replace workflows with new one
Browse files Browse the repository at this point in the history
  • Loading branch information
radj307 committed Mar 4, 2024
1 parent eedc699 commit ba1a8ee
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 291 deletions.
152 changes: 0 additions & 152 deletions .github/workflows/GenerateRelease.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/Linux.yml

This file was deleted.

127 changes: 127 additions & 0 deletions .github/workflows/MakeRelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Make Release

on:
push:
tags: [ '[0-9]+.[0-9]+.[0-9]+-?**' ]

jobs:
build-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Requirements
run: choco install ninja

#- uses: ilammy/msvc-dev-cmd@v1

- name: CMake Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja

- name: CMake Build
run: cmake --build build --config Release

- name: Create Archive
run: Compress-Archive build/ARRCON/*.exe ARRCON-$(.\ARRCON -vq)-Windows.zip
shell: pwsh

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-windows
path: 'ARRCON*.zip'


build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Requirements
run: sudo apt-get install -y gcc-10 cmake ninja-build

- name: CMake Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja
env:
CC: gcc-10
CXX: g++-10

- name: CMake Build
run: cmake --build build --config Release

- name: Create Archive
run: |
cd build/ARRCON
zip -T9 ARRCON-$(./ARRCON -vq)-Linux.zip *.exe
mv *.zip ../..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-linux
path: 'ARRCON*.zip'


build-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Requirements
run: brew install cmake ninja

- name: CMake Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja
env:
CC: clang
CXX: clang++

- name: CMake Build
run: cmake --build build --config Release

- name: Create Archive
run: |
cd build/ARRCON
zip -T9 ARRCON-$(./ARRCON -vq)-MacOS.zip *.exe
mv *.zip ../..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-macos
path: 'ARRCON*.zip'


make-release:
runs-on: ubuntu-latest
needs: [ build-windows, build-linux, build-macos ]
if: ${{ always() && contains(needs.*.result, 'success') }}
# ^ Run when at least one of the builds was successful

steps:
- name: Download Artifacts
uses: actions/download-artifact@v4

- name: Stage Files
run: mv ./build-*/* ./

- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: '*.zip'
45 changes: 0 additions & 45 deletions .github/workflows/Windows.yml

This file was deleted.

Loading

0 comments on commit ba1a8ee

Please sign in to comment.