mirror of
https://github.com/Xevion/factorio-achievements-fixer.git
synced 2025-12-09 20:07:06 -06:00
Add build action
This commit is contained in:
42
.github/workflows/build.yaml
vendored
Normal file
42
.github/workflows/build.yaml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Build
|
||||
|
||||
env:
|
||||
SLN_PATH: factorio-achievements-fixer/
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
- "LICENSE"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Install Application Dependencies
|
||||
run: dotnet restore ${{ env.SLN_PATH }}
|
||||
|
||||
- name: Build Application
|
||||
run: dotnet build ${{ env.SLN_PATH }} --configuration Release --no-restore
|
||||
|
||||
- name: Extract Version
|
||||
id: extract_version
|
||||
run: |
|
||||
version=$(grep -oP '(?<=\[assembly: AssemblyVersion\(")[^"]+' ${{ env.SLN_PATH }}/AssemblyInfo.cs)
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: factorio-achievements-fixer-$VERSION
|
||||
path:
|
||||
Reference in New Issue
Block a user