refactor: workflow update and fix #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration.Marketplaces.Trendyol | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/Integration.Core/** | ||
- src/Marketplaces/Integration.Marketplaces.Trendyol/** | ||
- .github/workflows/trendyol-integration.yml | ||
- .github/workflows/composite/** | ||
env: | ||
#For build process | ||
owner: onurkanbakirci | ||
repo: Integration | ||
project_path: ./src/Marketplaces/Integration.Marketplaces.Trendyol/ | ||
nupkg_path: ./src/Marketplaces/Integration.Marketplaces.Trendyol/bin/Release/Integration.Marketplaces.Trendyol.1.0.0.nupkg | ||
nupkg_source: 'github' | ||
nupkg_github_secret: ${{ secrets.GITHUB_TOKEN }} | ||
nupkg_nuget_secret: ${{ secrets.NUGET_API_KEY }} | ||
github_registry_url: https://nuget.pkg.github.com/onurkanbakirci/index.json | ||
nuget_registry_url: https://api.nuget.org/v3/index.json | ||
jobs: | ||
build_lib: | ||
name: Build Lib | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: | | ||
cd ${{env.project_path}} | ||
dotnet build --no-restore | ||
test_lib: | ||
name: Test Lib | ||
runs-on: ubuntu-latest | ||
needs: build-lib | ||
Check failure on line 54 in .github/workflows/trendyol-integration.yml GitHub Actions / Integration.Marketplaces.TrendyolInvalid workflow file
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Test | ||
run: | | ||
publish_lib_to_github: | ||
name: Publish Lib to Github | ||
runs-on: ubuntu-latest | ||
needs: test_lib | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Push nuget package to github registry | ||
uses: ./.github/workflows/composite/publish-lib | ||
with: | ||
package_source: ${{env.github_registry_url}} | ||
path: ${{ env.project_path }} | ||
nupkg_path: ${{env.nupkg_path}} | ||
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: | ||
package_source: ${{env.nuget_registry_url}} | ||
path: ${{ env.project_path }} | ||
nupkg_path: ${{env.nupkg_path}} | ||
source: ${{ env.nupkg_source }} | ||
api_key: ${{ env.nupkg_nuget_secret }} |