Skip to content

Commit

Permalink
Merge pull request #11 from ZEISS-PiWeb/feature/Update_output_setting
Browse files Browse the repository at this point in the history
fix: Closes #10 by updating deprecated set-output
  • Loading branch information
georg-eckert-zeiss committed Feb 23, 2023
2 parents b5ac181 + fe32de2 commit 462ed6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Remove "/fix".
noFix="${noFeature/fix/}"
# Shorten name to 20 characters. Set it as output of the name "branch_name".
echo "::set-output name=branch_name::$( echo $noFix | cut -c 1-20 )"
echo "branch_name=$( echo $noFix | cut -c 1-20 )" >> $GITHUB_OUTPUT
id: normalize

feature-branch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:
# prerelease_version: {suffix from inputs}{commit count since last release tag}-{run-count, not raised by re-run}
# Example: -alpha0008-42
run: |
echo "::set-output name=prerelease_suffix::-${{ inputs.suffix }}$(printf %4s ${{ steps.gitversion.outputs.increment }} | tr ' ' 0)-${{ github.run_number }}"
echo "prerelease_suffix=-${{ inputs.suffix }}$(printf %4s ${{ steps.gitversion.outputs.increment }} | tr ' ' 0)-${{ github.run_number }}" >> $GITHUB_OUTPUT
id: prerelease_version

- name: Output version
# If input "prerelease" == false, then steps.prerelease_version.outputs.prerelease_suffix will be empty.
run: |
echo "::set-output name=final_version::${{ steps.gitversion.outputs.version }}${{ steps.prerelease_version.outputs.prerelease_suffix }}"
echo "final_version=${{ steps.gitversion.outputs.version }}${{ steps.prerelease_version.outputs.prerelease_suffix }}" >> $GITHUB_OUTPUT
id: nuget_version # Output name.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Two of the workflows require secrets to be passed on to work as intended:

* `publish.yml` pushes NuGet packages to nuget.org and needs a personal access token named `NUGET_FEED_PAT` with proper permissions
* `create-release.yml` creates commits, merges and creates branches and pushes to the target repository and need a GitHub personal access token name `PUSH_TO_GITHUB_REPO_PAT` with proper permissions
- the only permission to be set is `public_repo`

0 comments on commit 462ed6f

Please sign in to comment.