Add configuration options for Amazon Shipping API #18
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: "Dev CI/CD" | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [feature/*, release/*] | |
# environment vars | |
env: | |
configuration: Release | |
solution: EasyKeys.Shipping.sln | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
outputs: | |
Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }} | |
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# https://github.com/GitTools/actions | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: "5.x" | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # to fetch all history for all tags and branches | |
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute/usage-examples.md | |
- name: Use GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
updateAssemblyInfo: false | |
updateAssemblyInfoFilename: false | |
- name: Display GitVersion outputs | |
run: | | |
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}" | |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | |
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}" | |
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}" | |
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" | |
- name: Install .net8.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "8.0.x" | |
include-prerelease: true | |
- name: Clear Nuget Feeds | |
run: dotnet nuget locals --clear all | |
- name: Restore dependencies | |
run: dotnet restore ${{ env.solution }} -v quiet | |
- name: Build | |
run: dotnet build ${{ env.solution }} --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} | |
- name: Test | |
run: dotnet test ./test/**/*.UnitTest.csproj --no-build --verbosity normal | |
- name: Package | |
run: dotnet pack --no-build --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} -o packages | |
- name: Publish Nuget Packages | |
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.FEEDZ_API_KEY }} --source https://f.feedz.io/easykeys/core/nuget/index.json --skip-duplicate --no-symbols |