update runtime #68
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- '*.*.*' | |
- '*.*.*-*.*' | |
jobs: | |
fetch-nethost-linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
shell: pwsh | |
run: | | |
.\download_dotnet.ps1 ${{ runner.temp }} linux | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nethost-linux | |
path: ${{ runner.temp }}/libnethost.tar | |
fetch-nethost-windows: | |
runs-on: windows-2022 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
shell: pwsh | |
run: | | |
.\download_dotnet.ps1 ${{ runner.temp }} win | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nethost-windows | |
path: ${{ runner.temp }}\libnethost.tar | |
build-api: | |
runs-on: ubuntu-latest | |
needs: [fetch-nethost-linux, fetch-nethost-windows] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- id: build_info | |
run: | | |
branch=$(git ls-remote --heads origin | grep $GITHUB_SHA | sed "s/.*\///") | |
branch=$(([[ $branch == 'release' ]] && echo "release") || ([[ $branch == 'rc' ]] && echo "rc") || ([[ $branch == 'dev' ]] && echo "dev") || echo "$branch") | |
version=${GITHUB_REF##*/} | |
echo "branch=$branch" >> $GITHUB_OUTPUT | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Replace package versions | |
run: | | |
echo "$(echo "`cat ./api/AltV.Net/AltV.Net.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net/AltV.Net.csproj | |
echo "$(echo "`cat ./api/AltV.Net/AltV.Net.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net/AltV.Net.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Async/AltV.Net.Async.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Async/AltV.Net.Async.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Async/AltV.Net.Async.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Async/AltV.Net.Async.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Interactions/AltV.Net.Interactions.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Interactions/AltV.Net.Interactions.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Interactions/AltV.Net.Interactions.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Interactions/AltV.Net.Interactions.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Resources.Chat.Api/AltV.Net.Resources.Chat.Api.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Resources.Chat.Api/AltV.Net.Resources.Chat.Api.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Resources.Chat.Api/AltV.Net.Resources.Chat.Api.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Resources.Chat.Api/AltV.Net.Resources.Chat.Api.csproj | |
echo "$(echo "`cat ./api/AltV.Net.EntitySync.ServerEvent/AltV.Net.EntitySync.ServerEvent.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.EntitySync.ServerEvent/AltV.Net.EntitySync.ServerEvent.csproj | |
echo "$(echo "`cat ./api/AltV.Net.EntitySync.ServerEvent/AltV.Net.EntitySync.ServerEvent.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.EntitySync.ServerEvent/AltV.Net.EntitySync.ServerEvent.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Client/AltV.Net.Client.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Client/AltV.Net.Client.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Client/AltV.Net.Client.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Client/AltV.Net.Client.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj | |
echo "$(echo "`cat ./api/AltV.Net.ColShape/AltV.Net.ColShape.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.ColShape/AltV.Net.ColShape.csproj | |
echo "$(echo "`cat ./api/AltV.Net.ColShape/AltV.Net.ColShape.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.ColShape/AltV.Net.ColShape.csproj | |
echo "$(echo "`cat ./api/AltV.Net.CApi/AltV.Net.CApi.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.CApi/AltV.Net.CApi.csproj | |
echo "$(echo "`cat ./api/AltV.Net.CApi/AltV.Net.CApi.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.CApi/AltV.Net.CApi.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Shared/AltV.Net.Shared.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Shared/AltV.Net.Shared.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Shared/AltV.Net.Shared.csproj`" | perl -pe 's/<PackageReleaseNotes>(.*)<\/PackageReleaseNotes>/<PackageReleaseNotes>Changelog can be found here https:\/\/github.com\/FabianTerhorst\/coreclr-module\/releases\/tag\/'${GITHUB_REF##*/}'<\/PackageReleaseNotes>/g')" > ./api/AltV.Net.Shared/AltV.Net.Shared.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Server/Sdk/Sdk.targets`" | perl -pe 's/Version=\"1.0.0\"/Version=\"'${GITHUB_REF##*/}'\"/g')" > ./api/AltV.Net.Sdk.Server/Sdk/Sdk.targets | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Client/Sdk/Sdk.targets`" | perl -pe 's/Version=\"1.0.0\"/Version=\"'${GITHUB_REF##*/}'\"/g')" > ./api/AltV.Net.Sdk.Client/Sdk/Sdk.targets | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Shared/Sdk/Sdk.targets`" | perl -pe 's/Version=\"1.0.0\"/Version=\"'${GITHUB_REF##*/}'\"/g')" > ./api/AltV.Net.Sdk.Shared/Sdk/Sdk.targets | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Server/AltV.Net.Sdk.Server.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Sdk.Server/AltV.Net.Sdk.Server.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Client/AltV.Net.Sdk.Client.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Sdk.Client/AltV.Net.Sdk.Client.csproj | |
echo "$(echo "`cat ./api/AltV.Net.Sdk.Shared/AltV.Net.Sdk.Shared.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./api/AltV.Net.Sdk.Shared/AltV.Net.Sdk.Shared.csproj | |
echo "$(echo "`cat ./templates/AltV.Net.Templates.csproj`" | perl -pe 's/<PackageVersion>(.*)<\/PackageVersion>/<PackageVersion>'${GITHUB_REF##*/}'<\/PackageVersion>/g')" > ./templates/AltV.Net.Templates.csproj | |
echo "$(echo "`cat ./templates/templates/altv-resource/.template.config/template.json`" | perl -pe 's/0.0.0/'${GITHUB_REF##*/}'/g')" > ./templates/templates/altv-resource/.template.config/template.json | |
echo "$(echo "`cat ./templates/templates/altv-project-client/.template.config/template.json`" | perl -pe 's/0.0.0/'${GITHUB_REF##*/}'/g')" > ./templates/templates/altv-project-client/.template.config/template.json | |
echo "$(echo "`cat ./templates/templates/altv-project-server/.template.config/template.json`" | perl -pe 's/0.0.0/'${GITHUB_REF##*/}'/g')" > ./templates/templates/altv-project-server/.template.config/template.json | |
echo "$(echo "`cat ./templates/templates/altv-project-shared/.template.config/template.json`" | perl -pe 's/0.0.0/'${GITHUB_REF##*/}'/g')" > ./templates/templates/altv-project-shared/.template.config/template.json | |
- name: Execute CodeGen | |
working-directory: ./api/AltV.Net.Sdk.Generator | |
run: dotnet run | |
- name: Build | |
working-directory: ./api | |
run: | | |
dotnet publish AltV.Net.Host -c Release -f net8.0 | |
dotnet publish AltV.Net.Host -c Release -f net8.0 | |
dotnet publish AltV.Net.Shared -c Release -f net8.0 | |
dotnet publish AltV.Net.CApi -c Release -f net8.0 | |
dotnet publish AltV.Net -c Release -f net8.0 | |
dotnet publish AltV.Net -c Debug -f net8.0 | |
dotnet publish AltV.Net.Async -c Release -f net8.0 | |
dotnet publish AltV.Net.Async -c Debug -f net8.0 | |
dotnet publish AltV.Net.Interactions -c Release -f net8.0 | |
dotnet publish AltV.Net.Async.CodeGen -c Release -f netstandard2.0 | |
dotnet publish AltV.Net.Resources.Chat.Api -c Release -f net8.0 | |
dotnet publish AltV.Net.EntitySync.ServerEvent -c Release -f net8.0 | |
dotnet publish AltV.Net.Client -c Release -f net8.0 | |
dotnet publish AltV.Net.Client.Async -c Release -f net8.0 | |
dotnet publish AltV.Net.ColShape -c Release -f net8.0 | |
dotnet publish AltV.Net.Sdk.Server -c Release -f net8.0 | |
dotnet publish AltV.Net.Sdk.Client -c Release -f net8.0 | |
dotnet publish AltV.Net.Sdk.Shared -c Release -f net8.0 | |
- run: | | |
mkdir -p ./modules/linux | |
mkdir -p ./modules/windows | |
mkdir -p ./modules/api-release | |
mkdir -p ./modules/api-debug | |
cp ./api/AltV.Net.Host/bin/Release/*/publish/AltV.Net.Host.dll ./modules/linux | |
cp ./api/AltV.Net.Host/bin/Release/*/publish/AltV.Net.Host.runtimeconfig.json ./modules/linux | |
cp ./api/AltV.Net.Host/bin/Release/*/publish/AltV.Net.Host.dll ./modules/windows | |
cp ./api/AltV.Net.Host/bin/Release/*/publish/AltV.Net.Host.runtimeconfig.json ./modules/windows | |
cp ./api/AltV.Net/bin/Release/*/publish/AltV.Net.dll ./modules/api-release | |
cp ./api/AltV.Net/bin/Release/*/publish/AltV.Net.pdb ./modules/api-release | |
cp ./api/AltV.Net.Async/bin/Release/*/publish/AltV.Net.Async.dll ./modules/api-release | |
cp ./api/AltV.Net.Async/bin/Release/*/publish/AltV.Net.Async.pdb ./modules/api-release | |
cp ./api/AltV.Net/bin/Debug/*/publish/AltV.Net.dll ./modules/api-debug | |
cp ./api/AltV.Net/bin/Debug/*/publish/AltV.Net.pdb ./modules/api-debug | |
cp ./api/AltV.Net.Async/bin/Debug/*/publish/AltV.Net.Async.dll ./modules/api-debug | |
cp ./api/AltV.Net.Async/bin/Debug/*/publish/AltV.Net.Async.pdb ./modules/api-debug | |
echo '${{ steps.build_info.outputs.branch }}/${{ steps.build_info.outputs.version }}' > ./modules/build_info.txt | |
- run: | | |
cd ./runtime | |
echo "$(git rev-parse --short HEAD)" > ../modules/runtime_version.txt | |
cd ./cpp-sdk | |
echo "$(git rev-parse --short HEAD)" > ../../modules/sdk_version.txt | |
- name: Pack files module | |
run: | | |
tar -cvf ./modules.tar modules | |
- name: Pack files api | |
run: | | |
tar -cvf ./api.tar api | |
- name: Pack files templates | |
run: | | |
tar -cvf ./templates.tar templates | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: csharp-module-modules | |
path: ./modules.tar | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: csharp-module-api | |
path: ./api.tar | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: csharp-module-templates | |
path: ./templates.tar | |
build-server: | |
runs-on: ${{ matrix.config.os }} | |
needs: [fetch-nethost-linux, fetch-nethost-windows] | |
strategy: | |
matrix: | |
config: | |
- { | |
name: linux, | |
os: ubuntu-20.04, | |
cc: gcc-9, | |
cxx: g++-9, | |
args: -DCMAKE_BUILD_TYPE=RelWithDebInfo, | |
nethost: nethost-linux, | |
} | |
- { | |
name: windows, | |
os: windows-latest, | |
cc: cl, | |
cxx: cl, | |
args: -DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64 -T host=x64, | |
nethost: nethost-windows, | |
} | |
#- { | |
# name: linux-arm, | |
# os: ubuntu-latest, | |
# cc: aarch64-linux-gnu-gcc-8, | |
# cxx: aarch64-linux-gnu-g++-8, | |
# args: -DCMAKE_BUILD_TYPE=RelWithDebInfo, | |
# nethost: nethost-linux-arm, | |
# } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.config.nethost }} | |
path: ./runtime/nethost | |
- working-directory: ./runtime/nethost | |
shell: bash | |
run: | | |
tar xvf libnethost.tar | |
ls -l | |
pwd | |
- working-directory: ./runtime/server | |
shell: cmake -P {0} | |
run: | | |
set(ENV{CC} ${{ matrix.config.cc }}) | |
set(ENV{CXX} ${{ matrix.config.cxx }}) | |
file(MAKE_DIRECTORY build) | |
execute_process( | |
COMMAND cmake .. ${{ matrix.config.args }} | |
RESULT_VARIABLE result | |
WORKING_DIRECTORY build | |
) | |
if (NOT result EQUAL 0) | |
message(FATAL_ERROR "Bad exit status") | |
endif() | |
- working-directory: ./runtime/server | |
shell: bash | |
run: cmake --build build --config RelWithDebInfo | |
- if: ${{ runner.os == 'Linux' }} | |
shell: bash | |
run: | | |
mkdir -p modules/linux/modules/ | |
cp ./runtime/server/build/src/libcsharp-module.so ./modules/linux/modules | |
- if: ${{ runner.os == 'Windows' }} | |
shell: bash | |
run: | | |
mkdir -p modules/windows/modules/ | |
cp ./runtime/server/build/src/RelWithDebInfo/csharp-module.dll ./modules/windows/modules | |
cp ./runtime/server/build/src/RelWithDebInfo/csharp-module.pdb ./modules/windows/modules | |
- id: create_archive | |
shell: bash | |
run: | | |
filename=$(echo "${{ matrix.config.name }}") | |
tar -cvf ./$filename.tar modules/$filename/modules | |
echo "art_name=$filename" >> $GITHUB_OUTPUT | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: csharp-module-${{ matrix.config.name }} | |
path: ./${{ steps.create_archive.outputs.art_name }}.tar | |
deploy-cdn: | |
runs-on: ubuntu-latest | |
needs: [build-api, build-server] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-modules | |
path: ./ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-linux | |
path: ./ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-windows | |
path: ./ | |
- run: | | |
tar -xvf ./modules.tar | |
tar -xvf ./linux.tar | |
tar -xvf ./windows.tar | |
- id: build_info | |
run: | | |
build_info=$(cat ./modules/build_info.txt) | |
echo "branch=${build_info%%/*}" >> $GITHUB_OUTPUT | |
echo "version=${build_info##*/}" >> $GITHUB_OUTPUT | |
echo "sdk_commit=$(cat ./modules/sdk_version.txt)" >> $GITHUB_OUTPUT | |
- run: npm i @altmp/upload-tool@latest [email protected] | |
- run: npx alt-upload linux coreclr-module/$BRANCH/x64_linux $VERSION $SDK_VERSION | |
working-directory: ./modules | |
env: | |
AWS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | |
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }} | |
CF_CACHE_PURGE_TOKEN: ${{ secrets.CF_CACHE_PURGE_TOKEN }} | |
CF_CACHE_ZONE_ID: ${{ secrets.CF_CACHE_ZONE_ID }} | |
CF_CACHE_PURGE_URL: ${{ secrets.CF_CACHE_PURGE_URL }} | |
BRANCH: ${{ steps.build_info.outputs.branch }} | |
VERSION: ${{ steps.build_info.outputs.version }} | |
SDK_VERSION: ${{ steps.build_info.outputs.sdk_commit }} | |
- run: npx alt-upload windows coreclr-module/$BRANCH/x64_win32 $VERSION $SDK_VERSION | |
working-directory: ./modules | |
env: | |
AWS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | |
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }} | |
CF_CACHE_PURGE_TOKEN: ${{ secrets.CF_CACHE_PURGE_TOKEN }} | |
CF_CACHE_ZONE_ID: ${{ secrets.CF_CACHE_ZONE_ID }} | |
CF_CACHE_PURGE_URL: ${{ secrets.CF_CACHE_PURGE_URL }} | |
BRANCH: ${{ steps.build_info.outputs.branch }} | |
VERSION: ${{ steps.build_info.outputs.version }} | |
SDK_VERSION: ${{ steps.build_info.outputs.sdk_commit }} | |
deploy-nuget: | |
runs-on: ubuntu-latest | |
needs: [build-api, build-server] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-api | |
path: ./ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-templates | |
path: ./ | |
- run: | | |
tar -xvf ./api.tar | |
tar -xvf ./templates.tar | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net/AltV.Net.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Async/AltV.Net.Async.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Interactions/AltV.Net.Interactions.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Resources.Chat.Api/AltV.Net.Resources.Chat.Api.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.EntitySync.ServerEvent/AltV.Net.EntitySync.ServerEvent.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Client/AltV.Net.Client.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.ColShape/AltV.Net.ColShape.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Shared/AltV.Net.Shared.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.CApi/AltV.Net.CApi.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Sdk.Client/AltV.Net.Sdk.Client.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Sdk.Server/AltV.Net.Sdk.Server.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./api/AltV.Net.Sdk.Shared/AltV.Net.Sdk.Shared.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
- uses: alirezanet/[email protected] | |
with: | |
PROJECT_FILE_PATH: ./templates/AltV.Net.Templates.csproj | |
VERSION_REGEX: <PackageVersion>(.*)<\/PackageVersion> | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | |
INCLUDE_SYMBOLS: true | |
TAG_COMMIT: false | |
NO_BUILD: true | |
build-docker: | |
name: Trigger Docker image build | |
runs-on: ubuntu-latest | |
needs: [deploy-cdn] | |
steps: | |
- name: Get Token | |
id: get_workflow_token | |
uses: peter-murray/workflow-application-token-action@v2 | |
with: | |
application_id: ${{ secrets.CI_APP_ID }} | |
application_private_key: ${{ secrets.CI_APP_PRIVATE_KEY }} | |
permissions: "actions:write" | |
organization: altmp | |
- name: Trigger Docker build | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: build.yml | |
ref: main | |
repo: altmp/altv-docker | |
token: ${{ steps.get_workflow_token.outputs.token }} | |
create-release: | |
runs-on: ubuntu-latest | |
needs: [deploy-cdn, deploy-nuget] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-modules | |
path: ./ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-linux | |
path: ./ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: csharp-module-windows | |
path: ./ | |
- run: | | |
tar -xvf ./modules.tar | |
tar -xvf ./linux.tar | |
tar -xvf ./windows.tar | |
- id: build_info | |
run: | | |
build_info=$(cat ./modules/build_info.txt) | |
echo "branch=${build_info%%/*}" >> $GITHUB_OUTPUT | |
echo "version=${build_info##*/}" >> $GITHUB_OUTPUT | |
echo "runtime_commit=$(cat ./modules/runtime_version.txt)" >> $GITHUB_OUTPUT | |
echo "sdk_commit=$(cat ./modules/sdk_version.txt)" >> $GITHUB_OUTPUT | |
- run: | | |
(cd ./modules/linux && zip -r ../../csharp-module-linux.zip *) | |
(cd ./modules/windows && zip -r ../../csharp-module-win.zip *) | |
(cd ./modules/api-release && zip -r ../../csharp-module-modules-release.zip *) | |
(cd ./modules/api-debug && zip -r ../../csharp-module-modules-debug.zip *) | |
- id: create_release | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.build_info.outputs.version }} | |
name: Version ${{ steps.build_info.outputs.version }} | |
prerelease: ${{ steps.build_info.outputs.branch != 'release' }} | |
generate_release_notes: true | |
body: | | |
Runtime version: [${{ steps.build_info.outputs.runtime_commit }}](https://github.com/altmp/coreclr-module-runtime/commit/${{ steps.build_info.outputs.runtime_commit }}) | |
SDK version: [${{ steps.build_info.outputs.sdk_commit }}](https://github.com/altmp/cpp-sdk/commit/${{ steps.build_info.outputs.sdk_commit }}) | |
files: | | |
./csharp-module-linux.zip | |
./csharp-module-win.zip | |
./csharp-module-modules-release.zip | |
./csharp-module-modules-debug.zip | |
cleanup: | |
runs-on: ubuntu-latest | |
needs: create-release | |
if: ${{ always() }} | |
steps: | |
- uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: | | |
nethost-linux | |
nethost-windows | |
csharp-module-linux | |
csharp-module-windows | |
csharp-module-modules | |
csharp-module-api | |
csharp-module-templates |