Add release job

This commit is contained in:
Luke Street 2021-04-12 20:03:17 -04:00
parent c53c9560fd
commit e2af6e5c79
2 changed files with 46 additions and 13 deletions

View File

@ -1,8 +1,11 @@
name: Test
name: Build
on:
push:
pull_request:
jobs:
test-linux:
build-linux-x86_64:
name: Build Linux (GCC x86_64)
runs-on: ubuntu-20.04
steps:
@ -37,11 +40,11 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: atdna-${{env.ATHENA_VERSION}}-linux-x86_64
name: atdna-linux-x86_64
path: |
build/athena-*.tar.gz
test-linux-arm64:
build-linux-arm64:
name: Build Linux (GCC aarch64)
runs-on: ubuntu-20.04
steps:
@ -70,11 +73,11 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: atdna-${{env.ATHENA_VERSION}}-linux-aarch64
name: atdna-linux-aarch64
path: |
build/athena-*.tar.gz
test-macos:
build-macos-universal:
name: Build macOS (AppleClang universal)
runs-on: macos-10.15
steps:
@ -113,12 +116,12 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: athena-${{env.ATHENA_VERSION}}-macos-universal
name: athena-macos-universal
path: |
build/athena-*.tar.gz
test-windows-msvc:
name: Build Windows (MSVC x86_64)
build-win32-amd64:
name: Build Windows (MSVC AMD64)
runs-on: windows-2019
env:
LLVM_VERSION: 10.0.1
@ -159,6 +162,36 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: athena-${{env.ATHENA_VERSION}}-win32-x86_64
name: athena-win32-amd64
path: |
build/athena-*.7z
release:
name: Release
runs-on: ubuntu-20.04
if:
contains('
refs/heads/master
refs/heads/test
', github.ref)
needs:
- build-linux-x86_64
- build-linux-aarch64
- build-macos-universal
- build-win32-amd64
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{github.token}}
automatic_release_tag: latest
prerelease: true
title: Development build
files: |
artifacts/*

View File

@ -413,7 +413,7 @@ set(CPACK_PACKAGE_VERSION_PATCH ${ATHENA_PATCH_VERSION})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "athena")
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
string(TOLOWER CMAKE_SYSTEM_PROCESSOR ARCHITECTURE_NAME)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCHITECTURE_NAME)
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
set(SYSTEM_NAME win32)
elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
@ -429,7 +429,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
else ()
set(SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
endif ()
set(CPACK_PACKAGE_FILE_NAME "athena-${ATHENA_WC_DESCRIBE}-${SYSTEM_NAME}-${ARCHITECTURE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "athena-${SYSTEM_NAME}-${ARCHITECTURE_NAME}")
if (WIN32)
set(CPACK_GENERATOR 7Z)