Skip to content

Commit

Permalink
Add script to set build version
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsonsousa committed Nov 17, 2024
1 parent a33ba16 commit beea65f
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
# Setting build version with https://github.com/marketplace/actions/net-project-version-updater

name: CmsEngine

Expand All @@ -15,14 +16,32 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-build --verbosity normal
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Set build version
id: bump
uses: vers-one/dotnet-project-version-updater@v1.7
with:
file: "**/*.csproj"
version: ${{ github.event.inputs.version }}

- run: |
git config user.name "Davidson Sousa"
git config user.email "davidsonsousa@users.noreply.github.com"
git add .
git commit -m "Bump project version to ${{ github.ref_name }}"
git push
# - name: Test
# run: dotnet test --no-build --verbosity normal

0 comments on commit beea65f

Please sign in to comment.