steps: - name: convert-markdown-to-pdf image: fish commands: - mkdir -p dist - curl -sLo icon.svg https://klingenbergbygg.no/icon-normalized.svg - for md in (find . -name "*.md" ! -path "./.git/*"); pandoc -f gfm+tex_math_dollars -t pdf -o "dist/$(basename $md .md).pdf" --pdf-engine=typst --template=stil.typ $md; end - "curl --silent --fail --header \"Authorization: token $GITEA_PACKAGE_TOKEN\" \"$GITEA_SERVER/api/v1/repos/$CI_REPO/releases/tags/$CI_COMMIT_TAG\" | jq -r '.id' > ./release_id" - "for pdf in (find dist -name '*.pdf'); curl --silent --show-error --fail --header \"Authorization: token $GITEA_PACKAGE_TOKEN\" --form \"attachment=@$pdf\" \"$GITEA_SERVER/api/v1/repos/$CI_REPO/releases/\"(cat ./release_id)\"/assets?name=\"(basename $pdf); end" when: - event: [tag] branch: main