Skip to content

Commit

Permalink
Add build job.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed Jan 12, 2025
1 parent 22bccc2 commit 9e88779
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,49 @@ jobs:
with:
name: Test Results
path: NWNX.NET.Tests/bin/Release/NWNX.NET.Tests/results/*.xml

build:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: [compile, test]
outputs:
version: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Version and Tag
id: bump_version
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
RELEASE_BRANCHES: main
WITH_V: true
PRERELEASE_SUFFIX: alpha
PRERELEASE: ${{ github.ref != 'main' }}
TAG_CONTEXT: branch

- name: Prepare Outputs
id: vars
run: |
echo "VERSION=$(echo ${{ steps.bump_version.outputs.tag }} | sed 's/[v]//g')" >> "$GITHUB_OUTPUT"
- name: Build Release Binaries
id: build
run: dotnet build --configuration Release -p:Version=${{ steps.vars.outputs.VERSION }}

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Binaries
path: bin/Release
if-no-files-found: error

0 comments on commit 9e88779

Please sign in to comment.