Skip to content

Commit 1e6921c

Browse files
committed
fix: Fixed URLs
1 parent 512d0f2 commit 1e6921c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
tag:
1010
description: 'Tag to mirror (e.g. v1.2.3)'
1111
required: true
12-
default: ${GITHUB_REF_NAME}
12+
default: ${{ github.ref_name }}
1313

1414
permissions:
1515
contents: write
@@ -21,24 +21,24 @@ jobs:
2121
GITLAB_PROJECT: uniget-org/cli
2222
GITLAB_PROJECT_API: uniget-org%2Fcli
2323
GITLAB_REPO_URL: https://gitlab.com/${GITLAB_PROJECT}
24-
GITLAB_RELEASE_API_URL: https://gitlab.com/${GITLAB_PROJECT}/-/releases/${{ inputs.tag }}
25-
GITLAB_PROJECT_API_URL: "https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_API}/releases/${{ inputs.tag }}"
24+
GITLAB_RELEASE_URL: https://gitlab.com/${GITLAB_PROJECT}/-/releases
25+
GITLAB_PROJECT_API_URL: "https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_API}/releases"
2626
steps:
2727
- name: Mirror release from GitLab
2828
shell: bash
2929
run: |
3030
set -euo pipefail
3131
3232
echo "Fetching GitLab release for tag: ${{ inputs.tag }}"
33-
if ! curl --silent --show-error --location --fail --output release.json "${GITLAB_PROJECT_API_URL}"; then
34-
echo "ERROR: Failed to fetch GitLab release for tag >${{ inputs.tag }}>."
33+
if ! curl --silent --show-error --location --fail --output release.json "${GITLAB_PROJECT_API_URL}/${{ inputs.tag }}"; then
34+
echo "ERROR: Failed to fetch GitLab release for tag <${{ inputs.tag }}>."
3535
exit 1
3636
fi
3737
3838
title="$(jq -r '.name // .tag_name' release.json)"
3939
notes_file=release_notes.md
4040
{
41-
echo "Mirrored from GitLab: ${GITLAB_RELEASE_API_URL}"
41+
echo "Mirrored from GitLab: ${GITLAB_RELEASE_URL}/${{ inputs.tag }}"
4242
echo
4343
jq -r '.description // ""' release.json
4444
} >"${notes_file}"

0 commit comments

Comments
 (0)