Skip to content

build

build #12

Workflow file for this run

name: build
on:
workflow_dispatch:
jobs:
build-and-zip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Semantic version
uses: './.github/actions/dotnet/version'
id: version
- name: Restore and build
uses: './.github/actions/dotnet/build'
- name: Execute unit test and publish reports
uses: './.github/actions/dotnet/test'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Pack and sign NuGet packages
uses: './.github/actions/dotnet/pack'
if: ${{ inputs.pack }}
with:
pre-release-version: ${{steps.version.outputs.pre-release-version}}
release-version: ${{steps.version.outputs.release-version}}
- name: Zip build
shell: bash
run: |
# Create the directories
mkdir -p ./builds/lib/netstandard2.0
mkdir -p ./artifacts
# Copy the built files
cp ./src/ExCSS/bin/Release/netstandard2.0/ExCSS.Unity.dll ./artifacts/builds/lib/netstandard2.0/
cp ./src/ExCSS/bin/Release/netstandard2.0/ExCSS.Unity.pdb ./artifacts/builds/lib/netstandard2.0/
# Create the zip archive
zip -r ./artifacts/build.zip ./builds
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build.zip
path: ./artifacts