Skip to content

Release

Release #6

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
release-version:
description: "Release version"
default: "1.0.1"
jobs:
release:
name: Release v${{github.event.inputs.release-version}}
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set the package release version
uses: richardrigutins/replace-in-files@v2
with:
files: 'dotMap/dotMap.csproj'
search-text: '<Version>.*</Version>'
replacement-text: '<Version>${{github.event.inputs.release-version}}</Version>'
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
- name: Commit the new version
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Release v${{github.event.inputs.release-version}}"
- name: Push and save the new version
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref_name }}
github_token: ${{ secrets.NPMJS_DEVEXPERTS_BOT_PUBLISH_TOKEN }}