Skip to content

EasyPay (.Net) CD

EasyPay (.Net) CD #16

Workflow file for this run

name: EasyPay (.Net) CD
on:
workflow_dispatch:
inputs:
version:
description: 'EasyPay C# version'
required: true
default: '0.0.1.23'
note:
description: 'Spec Release Note'
required: false
default: 'Easypay spec pre-release'
push:
branches: [ master ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
env:
CONFIGURATION: Release
jobs:
build:
name: Build SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x
- name: Install NBGV tool
uses: dotnet/nbgv@master
id: nbgv
with:
setAllVars: true
- name: Set Version
run: nbgv cloud
- name: Create Package
run: dotnet pack --configuration ${{ env.CONFIGURATION }} -o packages
- name: Push packages to NuGet.org
run: |
dotnet nuget push ./packages/Easypay.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Create Release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false