Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Bump actions/upload-artifact from 3 to 4 #101

Bump actions/upload-artifact from 3 to 4

Bump actions/upload-artifact from 3 to 4 #101

Workflow file for this run

# This workflow handles all the CI checks, builds, and artifact publishing for NeosModLoader.
name: Test, Build, and Release
on: [push, pull_request]
env:
NeosPath: "${{ github.workspace }}/neos_install/" # set up in neos-modding-group/neos-plugin-setup-action
jobs:
build:
if: github.repository == 'neos-modding-group/NeosModLoader' # prevent forks from unintentionally running this workflow
runs-on: ubuntu-latest
steps:
- name: checkout NML
uses: actions/checkout@v4
- name: setup build environment
uses: neos-modding-group/neos-plugin-setup-action@master # This is where the Neos dependencies come from. Learn more at https://github.com/neos-modding-group/neos-plugin-setup-action
- name: lint
run: dotnet format --verbosity detailed --verify-no-changes ./NeosModLoader.sln
- name: build headed
run: |
dotnet build ./NeosModLoader.sln --configuration Release "-property:Headless=false;CopyToLibraries=false"
mv ./NeosModLoader/bin/Release/net462/NeosModLoader.dll ./NeosModLoader.dll
- name: build headless
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' # only build headless run for pushes to master or tags
run: |
dotnet build ./NeosModLoader.sln --configuration Release "-property:Headless=true;CopyToLibraries=false"
mv ./NeosModLoader/bin/Release/net462/NeosModLoader.dll ./NeosModLoaderHeadless.dll
- name: upload workflow artifacts
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' # only publish workflow artifacts for pushes to master or tags
uses: actions/upload-artifact@v4
with:
name: NeosModLoader
path: |
./NeosModLoader.dll
./NeosModLoaderHeadless.dll
if-no-files-found: error
- name: upload release artifacts
if: startsWith(github.ref, 'refs/tags/') # only publish release artifacts for pushes to tags
uses: softprops/action-gh-release@v1
with:
draft: true # if creating a new release, make it a draft
files: |
./NeosModLoader/bin/Release/net462/0Harmony.dll
./NeosModLoader.dll
./NeosModLoaderHeadless.dll
fail_on_unmatched_files: true