Skip to content

Merge pull request #46 from yamaritta/feat/sync-all-ldap #43

Merge pull request #46 from yamaritta/feat/sync-all-ldap

Merge pull request #46 from yamaritta/feat/sync-all-ldap #43

Workflow file for this run

name: Release
on: push
env:
SHA: ${{ GITHUB.SHA }}
REF: ${{ GITHUB.REF }}
RUN_ID: ${{ GITHUB.RUN_ID }}
RUN_NUMBER: ${{ GITHUB.RUN_NUMBER }}
BUILD_RUN_NUMBER: build.${{ GITHUB.RUN_NUMBER }}
GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }}
#NUGET_API_TOKEN: ${{ SECRETS.NUGET_API_KEY }}
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
include-prerelease: true
- name: Check .NET info
run: dotnet --info
- name: Install dependencies
run: dotnet restore
- name: Build solution
run: dotnet build -c Release --no-restore
- name: Test solution
run: dotnet test -c Release --no-build --no-restore --verbosity normal --results-directory test-results --collect:"XPlat Code Coverage" `
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=json,cobertura,lcov,teamcity,opencover
- name: Upload test results artefacts
uses: actions/upload-artifact@v1.0.0
with:
name: "drop-ci-test-results"
path: './test-results'
run-semantic-release:
runs-on: ubuntu-latest
needs: build
if: github.repository_owner == 'casgate' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run semantic-release
run: |
export PATH=$PATH:$(yarn global bin)
yarn global add semantic-release@19.0.2
semantic-release
release:
runs-on: windows-latest
needs: run-semantic-release
if: github.repository_owner == 'casgate' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Git fetch tags
run: git fetch --tags
- name: Check tags
run: git tag -l -n
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
include-prerelease: true
- name: Check .NET info
run: dotnet --info
- name: Install dependencies
run: dotnet restore
- name: Build solution
run: dotnet build -c Release --no-restore
- name: Pack packages
run: |
$LastTag = git describe --tags (git rev-list --tags --max-count=1);
echo "Last tag is: $LastTag";
$Version = ($LastTag).TrimStart('v');
echo "Publishing version: $Version";
dotnet pack -c Release -o packages /p:PackageVersion=$Version /p:Version=$Version;
- name: Upload packages artefacts
uses: actions/upload-artifact@v1.0.0
with:
name: "drop-ci-packages"
path: './packages'
- name: Add github nuget source
run: dotnet nuget add source https://nuget.pkg.github.com/casgate/index.json --name github.com --username casgate --password $env:GITHUB_TOKEN
- name: Push packages to github.com
run: dotnet nuget push .\packages\*.nupkg -s github.com --skip-duplicate;
#- name: Push packages to nuget.org
# run: dotnet nuget push .\packages\*.nupkg -s nuget.org -k $env:NUGET_API_TOKEN --skip-duplicate