Skip to content

Commit

Permalink
chore: just testing release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
7mochi committed Sep 13, 2024
1 parent b995137 commit 1c492af
Showing 1 changed file with 46 additions and 33 deletions.
79 changes: 46 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: LLHL - New version release

on:
push:
tags:
- '*'

jobs:
build-linux:
Expand Down Expand Up @@ -34,15 +32,17 @@ jobs:
- name: Clone LLHL repository
run: |
git clone https://github.com/7mochi/llhl
- name: Clone LLHL Resources repository
run: |
git clone https://github.com/7mochi/llhl-resources
- name: Build LLHL AGMOD serverfile .so
run: |
cd llhl-agmod
CPATH=$CPATH:/usr/include/c++/4.8.5/i686-redhat-linux CFG=$CONFIGURATION make -C dlls
cd $GITHUB_WORKSPACE
- name: Build LLHL proyect (Linux) with node-amxxpack
run: |
cd llhl && make init-linux && make build-linux
Expand All @@ -57,17 +57,34 @@ jobs:
mkdir -p llhl/dist/ag/dlls
mv llhl-agmod/dlls/ag_i386.so llhl/dist/ag/dlls/ag.so
mv llhl-agmod/network/delta.lst llhl/dist/ag/delta.lst
- name: Create folder for full release
run: |
mkdir -p llhl/dist-full
cp llhl/dist llhl/dist-full
- name: Move LLHL resources to LLHL folder
run: |
mv llhl-resources/maps-ag-official/* llhl/dist-full/ag
mv llhl-resources/maps-ehll-unofficial/* llhl/dist-full/ag
mv llhl-resources/maps-valve-official/* llhl/dist-full/ag
- name: Prepare releases in zip
run: |
cd llhl/dist && zip -r ../llhl-${{github.ref_name}}-linux.zip *
- name: Upload artifact
- name: Upload artifact (Lite version)
uses: actions/upload-artifact@v3
with:
name: llhl-${{github.ref_name}}-linux
name: llhl-${{github.ref_name}}-linux-lite
path: llhl/dist

- name: Upload artifact (Full version)
uses: actions/upload-artifact@v3
with:
name: llhl-${{github.ref_name}}-linux-full
path: llhl/dist-full

build-windows:
runs-on: windows-2019

Expand All @@ -84,7 +101,11 @@ jobs:
- name: Clone LLHL repository
run: |
git clone https://github.com/7mochi/llhl
cd llhl && git checkout 3.0-stable && cd $GITHUB_WORKSPACE
cd llhl && git checkout 3.0-stable
- name: Clone LLHL Resources repository
run: |
git clone https://github.com/7mochi/llhl-resources
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1
Expand All @@ -94,8 +115,6 @@ jobs:
cd llhl-agmod
msbuild multiplayer.sln -target:ag /p:Configuration=Release
cd $GITHUB_WORKSPACE
- name: Build LLHL proyect (Windows) with node-amxxpack
run: |
Expand All @@ -112,35 +131,29 @@ jobs:
move llhl-agmod/dlls/msvc/Release/ag.dll llhl/dist/ag/dlls/ag.dll
move llhl-agmod/network/delta.lst llhl/dist/ag/delta.lst
- name: Create folder for full release
run: |
mkdir -p llhl/dist-full
copy llhl/dist llhl/dist-full
- name: Move LLHL resources to LLHL folder
run: |
move llhl-resources/maps-ag-official/* llhl/dist-full/ag
move llhl-resources/maps-ehll-unofficial/* llhl/dist-full/ag
move llhl-resources/maps-valve-official/* llhl/dist-full/ag
- name: Prepare releases in zip
run: |
cd llhl/dist && Compress-Archive -Path * -DestinationPath ../llhl-${{github.ref_name}}-windows.zip
- name: Upload artifact
- name: Upload artifact (Lite version)
uses: actions/upload-artifact@v3
with:
name: llhl-${{github.ref_name}}-windows
name: llhl-${{github.ref_name}}-windows-lite
path: llhl/dist

release:
runs-on: ubuntu-latest
needs: [build-linux, build-windows]
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v3
with:
name: llhl-${{github.ref_name}}-linux

- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: llhl-${{github.ref_name}}-windows

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
llhl-${{github.ref_name}}-linux.zip
llhl-${{github.ref_name}}-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact (Full version)
uses: actions/upload-artifact@v3
with:
name: llhl-${{github.ref_name}}-windows-full
path: llhl/dist-full

0 comments on commit 1c492af

Please sign in to comment.