Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build.yml #26

Merged
merged 8 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build .NET 8 Console App

on:
push:
branches:
- pipeline

jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # Specify the .NET version

- name: Restore Dependencies
run: dotnet restore ./USM_Builder/USM_builder/USM_builder.csproj

- name: Build
run: dotnet build ./USM_Builder/USM_builder/USM_builder.csproj --configuration Release

- name: Publish
run: dotnet publish ./USM_Builder/USM_builder/USM_builder.csproj --configuration Release --output ./publish --runtime win-x64 --self-contained false -p:PublishSingleFile=true -p:PublishTrimmed=true

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: console-app-build
path: ./publish
36 changes: 36 additions & 0 deletions .github/workflows/build-self-contained.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build .NET 8 Console App

on:
push:
branches:
- main
- pipeline

jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # Specify the .NET version

- name: Restore Dependencies
run: dotnet restore ./USM_Builder/USM_builder/USM_builder.csproj

- name: Build
run: dotnet build ./USM_Builder/USM_builder/USM_builder.csproj --configuration Release

- name: Publish
run: dotnet publish ./USM_Builder/USM_builder/USM_builder.csproj --configuration Release --output ./publish --runtime win-x64 --self-contained

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: console-app-build
path: ./publish
Loading