Add .gitea/workflows/release-linux.yml
This commit is contained in:
63
.gitea/workflows/release-linux.yml
Normal file
63
.gitea/workflows/release-linux.yml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
name: release-linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-release-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set build config
|
||||||
|
id: config
|
||||||
|
run: |
|
||||||
|
echo "PLATFORM=Linux" >> $GITHUB_ENV
|
||||||
|
echo "CONFIGURATION=Shipping" >> $GITHUB_ENV
|
||||||
|
echo "PROJECT_FILE=MyProject/MyProject.uproject" >> $GITHUB_ENV
|
||||||
|
echo "OUTPUT_DIR=${{ github.workspace }}/output" >> $GITHUB_ENV
|
||||||
|
echo "UE_PATH=/path/to/UnrealEngine" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build Unreal Project (Linux)
|
||||||
|
uses: ./.gitea/actions/build-ue-project-unix
|
||||||
|
with:
|
||||||
|
platform: ${{ env.PLATFORM }}
|
||||||
|
ue_path: ${{ env.UE_PATH }}
|
||||||
|
project_file: ${{ env.PROJECT_FILE }}
|
||||||
|
configuration: ${{ env.CONFIGURATION }}
|
||||||
|
output: ${{ env.OUTPUT_DIR }}
|
||||||
|
|
||||||
|
- name: Upload package artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ue-build-linux-${{ github.ref_name }}
|
||||||
|
path: ${{ env.OUTPUT_DIR }}
|
||||||
|
|
||||||
|
- name: Create Release on Tag
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref_name }}
|
||||||
|
release_name: "Unreal Build Linux ${{ github.ref_name }}"
|
||||||
|
body: "Automatically built from tag ${{ github.ref_name }}."
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload Release Asset (Linux)
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
|
asset_path: ${{ env.OUTPUT_DIR }}
|
||||||
|
asset_name: ue-package-linux-${{ github.ref_name }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
Reference in New Issue
Block a user