Bump up version #2
This file contains hidden or 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: Bump up version | |
on: | |
workflow_dispatch: | |
inputs: | |
pre_release: | |
description: 'is preview' | |
type: boolean | |
required: true | |
default: false | |
jobs: | |
bump-up-version: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Publish | |
working-directory: ./build | |
run: | | |
git config --local user.name "${{ github.actor }}" | |
git config --local user.email "[email protected]" | |
dotnet new tool-manifest | |
dotnet tool install cake.tool --version 4.0.0 | |
dotnet tool install minver-cli --version 3.0.0 | |
dotnet cake --target publish --username="${{ github.actor }}" --email="[email protected]" --pre-release=${{ inputs.pre_release }} | |
- name: Push git changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true | |
- name: Push to nuget | |
run: dotnet nuget push ./build/outputs/nuget/HandyControl.*nupkg -k ${{ secrets.NUGETTOKEN }} -s https://api.nuget.org/v3/index.json | |
- name: Create github release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# For maximum compatibility, we choose the .net40 | |
files: ./build/outputs/installer/net40/* | |
body_path: ./build/outputs/CHANGELOG.md | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: ${{ inputs.pre_release }} |