Skip to content

Commit

Permalink
Move release/dev to a separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jbest84 committed Jan 31, 2024
1 parent e288705 commit e6715e9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: SData client library build

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
workflow_call:

jobs:
build:
Expand All @@ -28,16 +25,16 @@ jobs:
run: |
.\Build.ps1 -Debug $false
# TODO: Don't use a fixed version here
# TODO: Move to a different workflow - We don't want a nuget package for every push to master/develop
- name: nuspec
shell: pwsh
run: |
nuget pack .\DotNetSDataClient.nuspec -properties version=2.1 -OutputDirectory dist\nuget
- name: store artifacts
uses: actions/upload-artifact@v2
- name: store release artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
path: dist\nuget
name: release
path: dist\Release
if-no-files-found: error

- name: store debug artifacts
uses: actions/upload-artifact@v4
with:
name: debug
path: dist\Debug
if-no-files-found: error
11 changes: 11 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: release build

on:
push:
branches: ['master', 'develop']
pull_request:
branches: ['master', 'develop']

jobs:
build_job:
uses: ./github/workflows/compile.yml
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release build

on:
push:
tags:
- '**'

jobs:
build_job:
uses: ./github/workflows/compile.yml
nuget_job:
needs: build_job
runs-on: windows-2019
steps:
- name: Setup NuGet
uses: nuget/setup-nuget@v1
- name: download release
uses: actions/download-artifact@v4
with:
name: release
path: dist\release
- name: nuspec pack
shell: pwsh
run: |
nuget pack .\DotNetSDataClient.nuspec -properties version=${{ env.GITHUB_REF_NAME }} -OutputDirectory dist\nuget
- name: store artifacts
uses: actions/upload-artifact@v4
with:
name: nuget
path: dist\nuget

0 comments on commit e6715e9

Please sign in to comment.