Skip to content

Commit

Permalink
refactor: workflow update and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onurkanbakirci committed Dec 16, 2023
1 parent a27df39 commit 69a15c7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/composite/publish-lib/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:

- name: Add github as a source
shell: "bash"
run: dotnet nuget add source --username onurkanbakirci --password ${{inputs.api_key}} --store-password-in-clear-text --name github ${{package_source}}}
run: dotnet nuget add source --username onurkanbakirci --password ${{inputs.api_key}} --store-password-in-clear-text --name github ${{inputs.package_source}}}

- name: Publish nuget packages
shell: "bash"
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/integration-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
nuget_registry_url: https://api.nuget.org/v3/index.json

jobs:
build-lib:
build_lib:
name: Build Lib
runs-on: ubuntu-latest

Expand All @@ -47,10 +47,10 @@ jobs:
cd ${{env.project_path}}
dotnet build --no-restore
test-lib:
test_lib:
name: Test Lib
runs-on: ubuntu-latest
needs: build-lib
needs: build_lib

steps:
- name: Checkout repository
Expand All @@ -59,10 +59,10 @@ jobs:
- name: Test
run: |
publish-lib:
name: Publish Lib
publish_lib_to_github:
name: Publish Lib to Github
runs-on: ubuntu-latest
needs: test-lib
needs: test_lib

steps:
- name: Checkout repository
Expand All @@ -77,6 +77,15 @@ jobs:
source: ${{ env.nupkg_source }}
api_key: ${{ env.nupkg_github_secret }}

publish_lib_to_nuget:
name: Publish Lib to Nuget
runs-on: ubuntu-latest
needs: test_lib

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Push nuget package to nuget registry
uses: ./.github/workflows/composite/publish-lib
with:
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/trendyol-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
nuget_registry_url: https://api.nuget.org/v3/index.json

jobs:
build-lib:
build_lib:
name: Build Lib
runs-on: ubuntu-latest

Expand All @@ -48,7 +48,7 @@ jobs:
cd ${{env.project_path}}
dotnet build --no-restore
test-lib:
test_lib:
name: Test Lib
runs-on: ubuntu-latest
needs: build-lib
Expand All @@ -60,10 +60,10 @@ jobs:
- name: Test
run: |
publish-lib:
name: Publish Lib
publish_lib_to_github:
name: Publish Lib to Github
runs-on: ubuntu-latest
needs: test-lib
needs: test_lib

steps:
- name: Checkout repository
Expand All @@ -78,6 +78,15 @@ jobs:
source: ${{ env.nupkg_source }}
api_key: ${{ env.nupkg_github_secret }}

publish_lib_to_nuget:
name: Publish Lib to Nuget
runs-on: ubuntu-latest
needs: test_lib

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Push nuget package to nuget registry
uses: ./.github/workflows/composite/publish-lib
with:
Expand Down

0 comments on commit 69a15c7

Please sign in to comment.