Skip to content

Commit

Permalink
add automatic version change from release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegDokuka committed Dec 6, 2024
1 parent e5e4bd7 commit 401cb40
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ jobs:
with:
dotnet-version: '8.0.x'


- name: Update Directory.Build.props version from tag
working-directory: Rewrite
run: |
sed -i -E "s/<VersionPrefix>.*<\/VersionPrefix>/<VersionPrefix>${GITHUB_REF#refs/tags/}<\/VersionPrefix>/g" Directory.Build.props
- name: Commit version updates
working-directory: Rewrite
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add Directory.Build.props
git commit -m "bump version ${GITHUB_REF#refs/tags/}"
git push https://${GH_TOKEN}@github.com/openrewrite/rewrite-csharp.git HEAD:main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: build
run: |
(cd Rewrite && dotnet publish Rewrite.sln)
Expand Down

0 comments on commit 401cb40

Please sign in to comment.