maint(build): github actions deploy (#130)

This commit is contained in:
Xenxo Espasandín 2023-06-14 23:12:51 +02:00 committed by GitHub
parent 64c2f1ef70
commit 3125c2e879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 24 deletions

View File

@ -4,6 +4,8 @@ on:
push: push:
branches: branches:
- "**" - "**"
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request: pull_request:
branches: branches:
- "**" - "**"
@ -62,7 +64,6 @@ jobs:
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.exe build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.exe
# build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.pdb
build-mac: build-mac:
name: Build macOS name: Build macOS
@ -170,3 +171,26 @@ jobs:
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries
path: | path: |
build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool
deploy:
name: Deploy Release
runs-on: ubuntu-latest
needs: [ build-win, build-mac, build-lin ]
if: startsWith(github.ref, 'refs/tags/') && github.event.base_ref == 'refs/heads/prod'
steps:
- name: Check out files
uses: actions/checkout@v3
- name: Download Binaries
uses: actions/download-artifact@v3
with:
name: Windows release x64 binaries
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
gsc-tool.exe

View File

@ -1,23 +0,0 @@
version: 1.0.{build}
branches:
only:
- prod
skip_tags: true
image: Visual Studio 2022
configuration: Release
platform: x64
before_build:
- git submodule update --init --recursive
- ps: tools\windows\premake5.exe vs2022
build:
project: build/gsc-tool.sln
verbosity: minimal
test: false
artifacts:
- path: build/bin/x64/release/gsc-tool.exe
deploy:
- provider: GitHub
auth_token:
secure: VTY5eMFd/IOYDIZQeMM0J0uYss+wmTwreE+Hi0lXAQABQ/4igmCvqCFZ5DsrWhY/
on:
branch: prod