Skip to content

Commit

Permalink
Merge pull request #24 from ArveH/pr_version_problem
Browse files Browse the repository at this point in the history
Removed regex from PR tag
  • Loading branch information
ArveH committed Apr 7, 2024
2 parents 6ff61d5 + 163e7e8 commit 015907a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Build Console application
on:
pull_request:
branches: [ "master" ]
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
version:
description: 'Version to build (major.minor.patch)'
required: true
default: '0.0.0'
env:
slnFile: 'src/ABulkCopy.sln'
consoleProjFile: 'src/ABulkCopy.Cmd/ABulkCopy.Cmd.csproj'
Expand All @@ -24,6 +31,7 @@ jobs:
fetch-depth: 0

- name: Install GitVersion
if: github.event_name == 'workflow_dispatch'
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
Expand All @@ -33,15 +41,20 @@ jobs:

- name: Determine version
id: gitversion
if: github.event_name == 'workflow_dispatch'
uses: gittools/actions/gitversion/[email protected]
with:
updateAssemblyInfo: true
useConfigFile: true
overrideConfig: |
next-version=${{ github.event.inputs.version }}
- name: Publish
if: github.event_name == 'workflow_dispatch'
run: dotnet publish ${{env.consoleProjFile}} -c Release

- name: Upload program artifact
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: program
Expand Down Expand Up @@ -89,6 +102,7 @@ jobs:
run: dotnet test ./End2EndTests/bin/Debug/net8.0/End2EndTests.dll -v m

release:
if: github.event_name == 'workflow_dispatch'
name: Release
runs-on: ubuntu-latest
needs: test
Expand Down
3 changes: 2 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ assembly-file-versioning-scheme: MajorMinorPatch
branches:
pull-request:
increment: Patch
regex: ^master$
prevent-increment-of-merged-branch-version: false
tag: ''
master:
increment: Patch
prevent-increment-of-merged-branch-version: false
regex: ^master$
tag: ''
ignore:
Expand Down

0 comments on commit 015907a

Please sign in to comment.