name: 'Publish release' author: 'Forgejo authors' description: | Publish release inputs: forgejo: description: 'URL of the Forgejo instance where the release is uploaded (e.g. https://codeberg.org)' required: true from-owner: description: 'the owner from which a release is to be copied (e.g forgejo-integration)' required: true to-owner: description: 'the owner to which a release is to be copied (e.g. forgejo-experimental). It has be an organization in which doer has the required permissions. Or be the same as the doer' required: true repo: description: 'the repository from which a release is to be copied relative to from-owner and to-owner' default: 'forgejo' ref-name: description: 'ref_name of the tag of the release to be copied (e.g. github.ref_name)' required: true doer: description: 'Name of the user authoring the release (e.g. release-team). The user must be authorized to create packages in to-owner and releases in to-owner/repo' required: true token: description: 'application token created on forgejo by the doer, with a scope allowing it to create packages in to-owner and releases in to-owner/repo' required: true gpg-private-key: description: 'GPG Private Key to sign the release artifacts' gpg-passphrase: description: 'Passphrase of the GPG Private Key' verbose: description: 'Increase the verbosity level' default: 'false' runs: using: "composite" steps: - id: hostport run: | url="${{ inputs.forgejo }}" hostport=${url##http*://} hostport=${hostport%%/} echo "value=$hostport" >> "$GITHUB_OUTPUT" - id: tag-version run: | version="${{ inputs.ref-name }}" version=${version##*v} echo "value=$version" >> "$GITHUB_OUTPUT" - name: Create the release notes id: release-notes run: | anchor=${{ steps.tag-version.outputs.value }} anchor=${anchor//./-} cat >> "$GITHUB_OUTPUT" <