Some petit non-functionals #89
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: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
check_formatting: | |
runs-on: ubuntu-latest | |
name: Check Formatting | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
dotnet tool restore | |
dotnet csharpier --check . | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install dependencies | |
working-directory: AutomaticInterface | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
working-directory: AutomaticInterface | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
working-directory: AutomaticInterface | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
if: success() && startsWith(github.ref, 'refs/heads/master') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install dependencies | |
working-directory: AutomaticInterface | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
working-directory: AutomaticInterface | |
- name: Nuget | |
run: nuget push **\release\**\AutomaticInterface.*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} | |
- name: Get version | |
id: package_version | |
uses: KageKirin/get-csproj-version@v0 | |
with: | |
file: AutomaticInterface/AutomaticInterface/AutomaticInterface.csproj | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.package_version.outputs.version }} | |
release_name: Release ${{ steps.package_version.outputs.version }} | |
body: See Readme | |
draft: false | |
prerelease: false |