Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The scenario illustrated below shows how one can work with providing specific pr
|**orchestratorApplicationScope**|External application scope|False|"OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Jobs OR.Machines.Read OR.Monitoring OR.Robots.Read OR.Settings.Read OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Users.Read"|
|**projectVersion**|A valid semver tag version number (without the leading 'v') to set the version of the packages|True||
|**releaseNotes**|Release notes to be added in the generated .nupkg files|False||
|**projectUrl**|Project URL for the generated package. Usually associated with the Automation Hub project. If not provided, the repository URL will be used|||

## Outputs

Expand Down
24 changes: 20 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ inputs:
releaseNotes:
description: 'Release notes for the package'
required: false
projectUrl:
description: 'Project URL for the generated package. Usually associated with the Automation Hub project. If not provided, the repository URL will be used'
required: false
outputs:
packagesPath:
description: 'Folder containing the generated packages'
Expand All @@ -41,6 +44,20 @@ outputs:
runs:
using: "composite"
steps:
- id: set-urls
name: Set URLs
shell: bash
run: |
repoUrl="${{ github.server_url }}/${{ github.repository }}"
echo "repoUrl=$repoUrl" >> $GITHUB_OUTPUT
if [ -z "${{ inputs.projectUrl }}" ]; then
echo "projectUrl=$repoUrl" >> $GITHUB_OUTPUT
echo "projectUrl: $repoUrl"
else
echo "projectUrl=${{ inputs.projectUrl }}" >> $GITHUB_OUTPUT
echo "projectUrl: ${{ inputs.projectUrl}}"
fi

- id: pack
name: Pack
shell: bash
Expand All @@ -56,8 +73,6 @@ runs:
projectJsonFiles=$(echo "${{ inputs.projectFilePaths }}" | tr '\r\n' '\n' | sed '/^\s*$/d' | while read -r line; do echo "${{ github.workspace }}/$line"; done)
fi

repoUrl="${{ github.server_url }}/${{ github.repository }}"

while IFS= read -r p; do
echo "::group::uipcli output for packing project: $p"
uipcli package pack "$p" \
Expand All @@ -72,10 +87,11 @@ runs:
--releaseNotes "${{ inputs.releaseNotes }}" \
--version "${{ inputs.projectVersion }}" \
-l en-US \
--repositoryUrl "$repoUrl" \
--repositoryUrl "${{ steps.set-urls.outputs.repoUrl }}" \
--repositoryCommit "${{ github.sha }}" \
--repositoryBranch "${{ github.ref_name }}" \
--repositoryType git
--repositoryType git \
--projectUrl "${{ steps.set-urls.outputs.projectUrl }}"

echo "::endgroup::"

Expand Down