Skip to content

✨ Refactor SmppClient for improved readability and structure #25

✨ Refactor SmppClient for improved readability and structure

✨ Refactor SmppClient for improved readability and structure #25

Workflow file for this run

name: Build and Deploy Nuget Packages
on:
push:
branches:
- dev
- master
tags:
- v*
pull_request:
branches:
- dev
- master
workflow_dispatch:
jobs:
build-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore ./JamaaTech.Smpp.Net.Client/Smpp.Net.Client.csproj
- name: Build
run: dotnet build --no-restore ./JamaaTech.Smpp.Net.Client/Smpp.Net.Client.csproj
- name: Pack
run: dotnet pack --configuration Release ./JamaaTech.Smpp.Net.Client/Smpp.Net.Client.csproj --output nupkgs
- name: Upload artifact for Publish job
uses: actions/upload-artifact@v4
with:
name: .nuget-package
path: nupkgs/*.nupkg
deploy-package:
runs-on: ubuntu-latest
needs:
- build-package
if: ${{ github.event_name != 'pull_request' && github.ref_type == 'tag' }}
steps:
- name: Download artifact from build job
id: download
uses: actions/download-artifact@v4
with:
name: .nuget-package
- name: Publish
run: dotnet nuget push ${{ steps.download.outputs.download-path }}/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json