Skip to content

1.5.2

1.5.2 #30

Workflow file for this run

name: Release
on:
release:
types:
- released
env:
RUNNER_DIR: ./TmsRunner
NUGET_DIR: ./nuget
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
project: [
./Tms.Adapter,
./Tms.Adapter.Core,
./Tms.Adapter.XUnit,
./Tms.Adapter.SpecFlowPlugin
]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore ${{ matrix.project }}
- name: Build project
run: |
dotnet build --configuration Release \
--no-restore ${{ matrix.project }}
- name: Create NuGet package
run: |
dotnet pack --configuration Release \
--no-build --output ${{ env.NUGET_DIR }} \
${{ matrix.project }}
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: NuGet-package
path: ${{ env.NUGET_DIR }}/*.nupkg
publish:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: NuGet-package
path: ${{ env.NUGET_DIR }}
- name: Publish to NuGet.org
run: |
dotnet nuget push ${{ env.NUGET_DIR }}/*.nupkg \
--skip-duplicate \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ secrets.NUGET_PUBLISH_KEY }}
- name: Publish to GitHub Packages
run: |
dotnet nuget push ${{ env.NUGET_DIR }}/*.nupkg \
--skip-duplicate \
--source https://nuget.pkg.github.com/testit-tms/index.json \
--api-key ${{ secrets.GITHUB_TOKEN }}
runner_build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: win-x64
artifact_name: TmsRunner.exe
asset_name: TmsRunner-win-x64-${{ github.event.release.tag_name }}.exe
- os: linux-x64
artifact_name: TmsRunner
asset_name: TmsRunner-linux-x64-${{ github.event.release.tag_name }}
- os: osx-x64
artifact_name: TmsRunner
asset_name: TmsRunner-osx-x64-${{ github.event.release.tag_name }}
needs: [ publish ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore ${{ env.RUNNER_DIR }}
- name: Publish project
run: |
dotnet publish \
-r ${{ matrix.os }} \
--configuration Release \
--self-contained true \
--output ./publish \
--no-restore ${{ env.RUNNER_DIR }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: publish/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true