show git config #31
This file contains 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: Auto Versioning | |
on: | |
push: | |
branches: | |
- auto-versioning | |
workflow_dispatch: | |
jobs: | |
versioning: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: "6.0.0" | |
- name: Determine Version | |
id: version_step # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
- name: Show GitVersion Config | |
run: | | |
pwd | |
/opt/hostedtoolcache/GitVersion.Tool/6.0.0/dotnet-gitversion /showconfig | |
- name: Update package.json Version | |
run: | | |
# Extract fullSemVer from GitVersion JSON output | |
VERSION=$(echo "${{ steps.version_step.outputs.SemVer }}") | |
echo "Updating package.json version to: $VERSION" | |
# Update package.json using jq | |
cd frontend | |
jq --arg ver "$VERSION" '.version = $ver' package.json > package.tmp.json && mv package.tmp.json package.json | |
- name: Show updated package.json | |
run: | | |
head -n 30 frontend/package.json |