Skip to content

Commit

Permalink
Update create-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-eckert-zeiss authored Feb 22, 2023
1 parent 0d924e4 commit 4780af4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Create a stable NuGet release. This workflow is manually triggered.
# Create a stable NuGet release.

name: Create release

# Run on manual trigger only
on:
workflow_call:

Expand All @@ -23,24 +22,26 @@ jobs:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}

- name: Output nuget version to variable
- name: Save NuGet version to a variable for easy access.
run: |
echo "NUGET_VERSION=${{ needs.compute-version.outputs.package_version }}" >> $GITHUB_ENV
- name: Setup git config
run: |
# setup the username and email. We use the 'GitHub Actions Bot'
# Setup bot user who will own the commits. We use the 'GitHub Actions Bot'.
git config user.name github-actions
git config user.email github-actions@github.com
- name: Start release branch
run: |
git checkout develop
echo Create release branch release/X.X.X
git checkout -b release/${{ env.NUGET_VERSION }}
- name: Commit and merge changes
run: |
echo Change version number, commit and push
# Change version number in all *.csproj files.
echo Change version number, commit and push.
find . -type f -name "*.csproj" -exec sed -i 's#<PackageVersion>[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]#<PackageVersion>${{ env.NUGET_VERSION }}#g' '{}' \;
find . -type f -name "*.csproj" -exec sed -i 's#<AssemblyVersion>[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]#<AssemblyVersion>${{ env.NUGET_VERSION }}#g' '{}' \;
Expand Down Expand Up @@ -70,14 +71,17 @@ jobs:
- name: Push all branches
run: |
git checkout main
# We push branch "main" with all tags so nothing gets lost.
git push origin main --tags
git checkout develop
git push origin develop
# We keep the support branch for bug and security fixes.
git checkout support/${{ env.NUGET_VERSION }}
git push origin support/${{ env.NUGET_VERSION }}
build-and-publish:
needs: release-flow
# Last but not least, run, package and publish from "main" to upload stable NuGet.
uses: ./.github/workflows/build-and-pack.yml
with:
configuration: "Release"
Expand Down

0 comments on commit 4780af4

Please sign in to comment.