Skip to content

Merge pull request #842 from openmod/update_om_unturned_version #815

Merge pull request #842 from openmod/update_om_unturned_version

Merge pull request #842 from openmod/update_om_unturned_version #815

name: OpenMod.Unturned.Module
on:
release:
types: [ published ]
push:
branches: [ main ]
paths:
- '.github/workflows/OpenMod.Unturned.Module.yaml'
- 'framework/**'
- 'unityengine/**'
- 'unturned/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/OpenMod.Unturned.Module.yaml'
- 'framework/**'
- 'unityengine/**'
- 'unturned/**'
jobs:
build:
name: "OpenMod.Unturned.Module Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v3
name: Setup .NET
with:
dotnet-version: 8.x
- uses: ./.github/actions/project-build
name: Building Project
id: project-build
with:
project_path: unturned/OpenMod.Unturned.Module
nuget_push: false
- name: Get Release
if: github.event_name == 'release'
id: get-release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install zip
if: github.event_name == 'release'
run: sudo apt-get install zip
- name: Zip artifacts
if: github.event_name == 'release'
run: "mkdir ./release && mkdir ./release/OpenMod.Unturned/ && mv ./unturned/OpenMod.Unturned.Module/bin/Release/netstandard2.1/linux-x64/* ./release/OpenMod.Unturned/ && mv ./release/OpenMod.Unturned/Readme.txt ./release && cd ./release && zip -qq -r ./release.zip *"
- name: Upload release asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get-release.outputs.upload_url }}
asset_path: ./release/release.zip
asset_name: OpenMod.Unturned.Module.zip
asset_content_type: application/zip