Skip to content

Commit

Permalink
Updated Yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco committed Jul 8, 2023
1 parent 351aa4d commit 4160192
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 131 deletions.
141 changes: 11 additions & 130 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
NuGetDirectory: ${{ github.workspace }}/nuget

defaults:
run:
Expand Down Expand Up @@ -44,50 +43,6 @@ jobs:
- name: Run tests
run: dotnet test --configuration Release

# Create the NuGet package in the folder from the environment variable NuGetDirectory
# - run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}

# # Publish the NuGet package as an artifact, so they can be used in the following jobs
# - uses: actions/upload-artifact@v3
# with:
# name: nuget
# if-no-files-found: error
# retention-days: 7
# path: ${{ env.NuGetDirectory }}/*.nupkg

#validate_nuget:
# runs-on: ubuntu-latest
# needs: [ create_nuget ]
# steps:
# # Install the .NET SDK indicated in the global.json file
# - name: Setup .NET
# uses: actions/setup-dotnet@v3

# # Download the NuGet package created in the previous job
# - uses: actions/download-artifact@v3
# with:
# name: nuget
# path: ${{ env.NuGetDirectory }}

# - name: Install nuget validator
# run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global

# # Validate metadata and content of the NuGet package
# # https://www.nuget.org/packages/Meziantou.Framework.NuGetPackageValidation.Tool#readme-body-tab
# # If some rules are not applicable, you can disable them
# # using the --excluded-rules or --excluded-rule-ids option
# - name: Validate package
# run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")

#run_test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Setup .NET
# uses: actions/setup-dotnet@v3
# - name: Run tests
# run: dotnet test --configuration Release

Deploy:
# Publish only when creating a GitHub Release
# https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
Expand All @@ -110,89 +65,15 @@ jobs:
run: dotnet build --configuration Release --no-restore

# Publish packages
- name: Publish FluentEmailer.Core
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Src/FluentEmailer.Core/FluentEmailer.Core.csproj
VERSION_FILE_PATH: Src/Directory.Build.props
NUGET_KEY: ${{secrets.NUGET_APIKEY}}
NUGET_SOURCE: https://api.nuget.org
INCLUDE_SYMBOLS: false

- name: Publish FluentEmailer.Smtp
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Src/Senders/FluentEmailer.Smtp/FluentEmailer.Smtp.csproj
VERSION_FILE_PATH: Src/Directory.Build.props
NUGET_KEY: ${{secrets.NUGET_APIKEY}}
NUGET_SOURCE: https://api.nuget.org
INCLUDE_SYMBOLS: false

#- name: Publish FluentEmailer.Sendgrid
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Senders/FluentEmailer.SendGrid/FluentEmailer.SendGrid.csproj
# VERSION_FILE_PATH: Src/Directory.Build.props
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org
# INCLUDE_SYMBOLS: false

#- name: Publish FluentEmailer.MailTrap
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Senders/FluentEmailer.Mailtrap/FluentEmailer.Mailtrap.csproj
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org

#- name: Publish FluentEmailer.MailKit
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Senders/FluentEmailer.MailKit/FluentEmailer.MailKit.csproj
# VERSION_FILE_PATH: Src/Directory.Build.props
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org
# INCLUDE_SYMBOLS: false

#- name: Publish FluentEmailer.Mailgun
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Senders/FluentEmailer.Mailgun/FluentEmailer.Mailgun.csproj
# VERSION_FILE_PATH: Src/Directory.Build.props
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org
# INCLUDE_SYMBOLS: false

- name: Publish FluentEmailer.MailerSend
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Src/Senders/FluentEmailer.MailerSend/FluentEmailer.MailerSend.csproj
VERSION_FILE_PATH: Src/Directory.Build.props
NUGET_KEY: ${{secrets.NUGET_APIKEY}}
NUGET_SOURCE: https://api.nuget.org
INCLUDE_SYMBOLS: false

#- name: Publish FluentEmailer.Razor
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Renderers/FluentEmailer.Razor/FluentEmailer.Razor.csproj
# VERSION_FILE_PATH: Src/Directory.Build.props
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org
# INCLUDE_SYMBOLS: false

- name: Publish FluentEmailer.Liquid
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Src/Renderers/FluentEmailer.Liquid/FluentEmailer.Liquid.csproj
VERSION_FILE_PATH: Src/Directory.Build.props
NUGET_KEY: ${{secrets.NUGET_APIKEY}}
NUGET_SOURCE: https://api.nuget.org
INCLUDE_SYMBOLS: false
- name: Pack FluentEmailer.Core
run: dotnet pack --no-build --configuration Release Src/FluentEmailer.Core/FluentEmailer.Core.csproj --output .
- name: Pack FluentEmailer.Smtp
run: dotnet pack --no-build --configuration Release Src/Senders/FluentEmailer.Smtp/FluentEmailer.Smtp.csproj --output .
- name: Pack FluentEmailer.MailerSend
run: dotnet pack --no-build --configuration Release Src/Senders/FluentEmailer.MailerSend/FluentEmailer.MailerSend.csproj --output .
- name: Pack FluentEmailer.Liquid
run: dotnet pack --no-build --configuration Release Src/Renderers/FluentEmailer.Liquid/FluentEmailer.Liquid.csproj --output .

- name: Publish packages
run: dotnet nuget push *.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

# This is currently maintained separately
#- name: Publish FluentEmailer.Graph
# uses: brandedoutcast/[email protected]
# with:
# PROJECT_FILE_PATH: Src/Senders/FluentEmailer.Graph/FluentEmailer.Graph.csproj
# NUGET_KEY: ${{secrets.NUGET_APIKEY}}
# NUGET_SOURCE: https://api.nuget.org
2 changes: 1 addition & 1 deletion Src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RepositoryUrl>https://github.com/marcoatribeiro/FluentEmailer</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>fluentemailer_logo_64x64.png</PackageIcon>
<Version>0.1.7</Version>
<Version>0.1.8</Version>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down

0 comments on commit 4160192

Please sign in to comment.