JT
1 year ago
committed by
GitHub
3 changed files with 25 additions and 66 deletions
@ -1,46 +0,0 @@
|
||||
name: .NET Build |
||||
|
||||
on: |
||||
push: |
||||
branches: [ main ] |
||||
pull_request: |
||||
branches: [ main ] |
||||
|
||||
concurrency: |
||||
group: build-${{ github.event.pull_request.number || github.ref }} |
||||
cancel-in-progress: true |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: windows-latest |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
|
||||
- name: Set up .NET |
||||
uses: actions/setup-dotnet@v3 |
||||
with: |
||||
dotnet-version: '6.0.x' |
||||
|
||||
- name: Cache NuGet packages |
||||
id: cache |
||||
uses: actions/cache@v1 |
||||
with: |
||||
path: ~/.nuget/packages |
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} |
||||
restore-keys: | |
||||
${{ runner.os }}-nuget- |
||||
|
||||
- name: Install dependencies |
||||
run: dotnet restore |
||||
|
||||
- name: Build |
||||
run: dotnet publish -o out -c Release --no-restore --self-contained false -p:IncludeNativeLibrariesForSelfExtract=false |
||||
|
||||
- name: Upload Artifacts |
||||
if: ${{ github.event_name == 'push' }} |
||||
uses: actions/upload-artifact@v2 |
||||
with: |
||||
name: build |
||||
path: | |
||||
out |
@ -1,20 +0,0 @@
|
||||
name: Remove old artifacts |
||||
|
||||
on: |
||||
workflow_dispatch: |
||||
schedule: |
||||
# Every day at 1am |
||||
- cron: '0 1 * * *' |
||||
|
||||
jobs: |
||||
remove-old-artifacts: |
||||
runs-on: ubuntu-latest |
||||
timeout-minutes: 10 |
||||
|
||||
steps: |
||||
- name: Remove old artifacts |
||||
uses: c-hive/gha-remove-artifacts@v1 |
||||
with: |
||||
age: '1 day' |
||||
skip-tags: true |
||||
skip-recent: 1 |
@ -0,0 +1,25 @@
|
||||
node("Windows") { |
||||
def repoName = "StabilityMatrix" |
||||
def author = "ionite34" |
||||
def version = "" |
||||
|
||||
stage('Clean') { |
||||
deleteDir() |
||||
} |
||||
|
||||
stage('Checkout') { |
||||
git branch: env.BRANCH_NAME, credentialsId: 'Ionite', url: "https://github.com/${author}/${repoName}.git" |
||||
} |
||||
|
||||
stage('Build') { |
||||
bat "dotnet publish -c Release -o out -r win-x64 --self-contained true" |
||||
} |
||||
|
||||
stage('Set Version') { |
||||
version = VersionNumber projectStartDate: '', versionNumberString: '${BUILD_DATE_FORMATTED, "yy"}.${BUILD_WEEK}.${BUILDS_THIS_WEEK}', versionPrefix: '', worstResultForIncrement: 'SUCCESS' |
||||
} |
||||
|
||||
stage ('Archive Artifacts') { |
||||
archiveArtifacts artifacts: 'out/**/*.*', followSymlinks: false |
||||
} |
||||
} |
Loading…
Reference in new issue