Skip to content

Add GitHub action to create release #7

Add GitHub action to create release

Add GitHub action to create release #7

Workflow file for this run

name: Create release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build - ${{ matrix.configuration }}
strategy:
matrix:
configuration: [ Release ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
3.1.x
- name: Get next version
uses: reecetech/version-increment@2023.9.3
id: version
with:
scheme: semver
increment: patch
- name: Install version tool
run: dotnet tool install -g dotnetCampus.TagToVersion
- name: Set version
run: dotnet TagToVersion -t ${{ steps.version.outputs.version }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: package
path: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
retention-days: 5
- name: Release
uses: softprops/action-gh-release@v1
with:
files: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
tag_name: ${{ steps.version.outputs.version }}
prerelease: true