EHS/.gitea/workflows/Build_Release.yaml

75 lines
2.0 KiB
YAML
Raw Normal View History

2024-01-31 16:34:36 -08:00
name: Build & Release
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on:
push:
tags:
- "v*"
jobs:
2024-01-31 17:29:36 -08:00
Linux-x86_64-Build:
2024-01-31 16:34:36 -08:00
runs-on: linux-x86_64
steps:
- name: Check out repository code
uses: actions/checkout@v3
2024-01-31 17:13:30 -08:00
- name: Installing Dependencies
run: |
sudo pacman -S --noconfirm zip alsa-lib libxcb xcb-util-cursor
2024-01-31 16:34:36 -08:00
- name: Building/Compiling Project
run: |
cd ${{ gitea.workspace }}
cmake -DCMAKE_BUILD_TYPE=Debug -DLINUX_WINDOW_SYSTEM:STRING=XCB .
cmake --build . --config Debug
2024-01-31 17:43:25 -08:00
- name: Creating Appropriate Directories
run: |
mkdir bin
mv StrToHash bin
mkdir lib
mv libEHS.a lib
2024-01-31 16:34:36 -08:00
- name: Zipping Binaries
2024-01-31 17:43:25 -08:00
run: zip -r ehs-linux-x86_64.zip include bin lib
2024-01-31 16:34:36 -08:00
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
2024-01-31 17:13:30 -08:00
ehs-linux-x86_64.zip
2024-01-31 16:34:36 -08:00
api_key: '${{secrets.RELEASE_TOKEN}}'
Linux-AARCH64-Build:
runs-on: linux-aarch64
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Installing Dependencies
run: sudo apt install -y zip libasound2-dev libxcb1-dev libxcb-xinput-dev libxcb-cursor-dev
- name: Building/Compiling Project
run: |
cd ${{ gitea.workspace }}
cmake -DCMAKE_BUILD_TYPE=Debug -DLINUX_WINDOW_SYSTEM:STRING=XCB .
cmake --build . --config Debug
- name: Zipping Binaries
2024-01-31 17:34:45 -08:00
run: zip -r ehs-linux-aarch64.zip include libEHS.a StrToHash
2024-01-31 16:34:36 -08:00
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
2024-01-31 16:39:26 -08:00
ehs-linux-aarch64.zip
2024-01-31 16:34:36 -08:00
api_key: '${{secrets.RELEASE_TOKEN}}'