This repository has been archived by the owner on May 3, 2024. It is now read-only.
Update README.md #9
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: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Setup .NET 6 (SDK) | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
source-url: https://nuget.pkg.github.com/enclave-networks/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{github.token}} | |
- name: Build | |
run: dotnet build -c Release /p:Version=${{ steps.gitversion.outputs.SemVer }} | |
- name: Push Github Source Packages | |
if: github.event_name == 'push' | |
run: dotnet nuget push src/**/*${{ steps.gitversion.outputs.SemVer }}.nupkg --api-key ${{github.token}} -s https://nuget.pkg.github.com/enclave-networks/index.json --skip-duplicate --no-symbols | |
- name: Create Release | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.gitversion.outputs.SemVer }} | |
release_name: Release v${{ steps.gitversion.outputs.SemVer }} | |
body: Latest SDK Release |