{"id":18379724,"url":"https://github.com/paolobrasolin/ctan-submit-action","last_synced_at":"2025-04-06T22:32:36.214Z","repository":{"id":65161244,"uuid":"430095931","full_name":"paolobrasolin/ctan-submit-action","owner":"paolobrasolin","description":"GitHub action for submitting to CTAN","archived":false,"fork":false,"pushed_at":"2022-12-16T17:16:00.000Z","size":742,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T04:01:32.439Z","etag":null,"topics":["action","actions","ctan","github-action","github-actions","latex","submitter","tex","validation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paolobrasolin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-20T12:23:29.000Z","updated_at":"2025-03-09T11:31:47.000Z","dependencies_parsed_at":"2023-01-13T15:44:22.295Z","dependency_job_id":null,"html_url":"https://github.com/paolobrasolin/ctan-submit-action","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"4437b1c7c0d3936d126f48fb36ae5225f5b62935"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paolobrasolin%2Fctan-submit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paolobrasolin%2Fctan-submit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paolobrasolin%2Fctan-submit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paolobrasolin%2Fctan-submit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paolobrasolin","download_url":"https://codeload.github.com/paolobrasolin/ctan-submit-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563902,"owners_count":20958971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","actions","ctan","github-action","github-actions","latex","submitter","tex","validation"],"created_at":"2024-11-06T00:39:40.714Z","updated_at":"2025-04-06T22:32:35.735Z","avatar_url":"https://github.com/paolobrasolin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CTAN submit\n\n[![CI tests status badge][ci-shield]][ci-url]\n\n[![Latest release badge][release-shield]][release-url]\n[![License badge][license-shield]][license-url]\n\n[ci-url]: https://github.com/paolobrasolin/ctan-submit-action/actions/workflows/main.yml \"CI tests\"\n[ci-shield]: https://img.shields.io/github/actions/workflow/status/paolobrasolin/ctan-submit-action/main.yml?branch=main\u0026label=nightly%20check\u0026logo=github\n[release-url]: https://github.com/paolobrasolin/ctan-submit-action/releases \"Latest release\"\n[release-shield]: https://img.shields.io/github/v/release/paolobrasolin/ctan-submit-action?display_name=tag\u0026sort=semver\n[license-url]: https://github.com/paolobrasolin/ctan-submit-action/blob/main/LICENSE \"License\"\n[license-shield]: https://img.shields.io/github/license/paolobrasolin/ctan-submit-action\n\nThis action performs a submit on the CTAN API to validate or upload a package.\n\n## Usage\n\nAs any other action, it's recommended to use the latest stable version: `paolobrasolin/ctan-submit-action@v1`.\n\n### Inputs\n\n#### `version`\n\nThis is the CTAN API version to address.\n\nThis input is **not required** and has **no default**.\n\nEffectively, the latest CTAN API version will be addressed by default.\nThat is most probably what you want.\n\nCurrently versions `1.1` and `1.0` (deprecated) exist.\nMore details at [Submitting to CTAN](https://ctan.org/help/submit/).\n\n#### `action`\n\nThis is the action to perform upon submit.\n\nThis input is **not required** and **defaults to `validate`**.\n\nAllowed values are:\n\n- `validate` to validate your submission.\n  More details at [Sending a Validation Request to CTAN\n  ](https://ctan.org/help/submit/#validation)\n\n- `upload` to validate and upload your submission.\n  More details at [Sending a Submission Request to CTAN\n  ](https://ctan.org/help/submit/#submit)\n\n#### `file_path`\n\nThis is the archive file path of the package you are submitting.\n\nThis input is **required** and has **no default**.\n\nYou can find more details on structuring the archive at [How can I upload a package?\n](https://ctan.org/help/upload-pkg) and [Additional Information for CTAN Uploaders\n](https://ctan.org/file/help/ctan/CTAN-upload-addendum).\n\n#### `fields`\n\nThis is a YAML string containing all metadata of the package you are submitting.\n\nThis input is **required** and has **no default**.\n\nYou can find exhaustive documentation for the available parameters at [Parameters for Validation](https://ctan.org/help/submit#validation.parameters).\n\n### Outputs\n\nCurrently there are no outputs.\n\nThe action will succeed (fail) if the request to the API succeeds (fails).\n\nAll errors, warnings and informative messages given by CTAN will be displayed in the log of your job.\n\n## Example workflows\n\nThe implementation details of your workflow will depend very much on your needs, but here a few examples you can get inspiration from.\n\n### Validating\n\nThere is a very simple workflow running a nightly check on this repo to ensure everything is in working order:\n\n[![CI tests status badge][ci-shield]][ci-url]\n\nIt uses CTAN API to perform a simple validity check, without actually submitting anything.\nAs long as the badge is green we can sleep easy using this action.\n\nYou can read its [full sourcode](https://github.com/paolobrasolin/ctan-submit-action/blob/main/.github/workflows/main.yml), but here's the gist of its structure:\n\n```yaml\nname: validate\non:\n  # ...\njobs:\n  post:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo\n        uses: actions/checkout@v2\n      - name: CTAN submit (validate only)\n        uses: paolobrasolin/ctan-submit-action@v1\n        with:\n          action: validate\n          # We use the file_path of a pre-built test fixture committed to the repo. You'd normally use the path of the archive resulting from your build steps.\n          file_path: ${{ github.workspace }}/test/fixtures/htunk.zip\n          fields: |\n            pkg: htunk\n            version: 0.1.0\n            author: Paolo Brasolin\n            email: paolo.brasolin@gmail.com \n            uploader: paolo.brasolin@gmail.com \n            license: mit\n            summary: This is a CI test\n```\n\n### Releasing\n\nNormally you'd want to use this action to publish releases to CTAN (and perhaps to GitHub itself).\n\nHere are the broad strokes of how you could implement that:\n\n```yaml\nname: release\non:\n  push:\n    tags:\n      # We match pushes of semantic versioning tags.\n      - v[0-9]+.[0-9]+.[0-9]+\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repo\n        uses: actions/checkout@v2\n\n      - # This step extracts the tag and the version into variables for reuse; you can do this in your preferred way.\n        name: Labeller\n        id: labeller\n        run: |\n          echo \"TAG=${GITHUB_REF/refs\\/tags\\//}\" \u003e\u003e $GITHUB_OUTPUT\n          echo \"VERSION=${GITHUB_REF/refs\\/tags\\/v/}\" \u003e\u003e $GITHUB_OUTPUT\n\n      - # This step is where you build the distributable of your package, named foobar.\n        name: Build\n        run: |\n          # TODO: somehow build and archive your package into dist/foobar.zip\n          cp dist/foobar.zip dist/foobar-${{ steps.labeller.outputs.version }}.zip\n\n      - # Optionally, you can also publish your release to GitHub.\n        name: Release on Github\n        uses: docker://antonyurchenko/git-release:v3\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          DRAFT_RELEASE: \"false\"\n          CHANGELOG_FILE: \"CHANGELOG.md\"\n          ALLOW_EMPTY_CHANGELOG: \"false\"\n          ALLOW_TAG_PREFIX: \"true\"\n          RELEASE_NAME: \"Foobar ${{ steps.labeller.outputs.version }}\"\n        with:\n          args: |\n            dist/foobar-${{ steps.labeller.outputs.version }}.zip\n\n      - # This step is executed only on the first submission of your package to CTAN, assuming your first release tag is v1.0.0. Note that it requires a lot more fields than the simple update step below. Please read and follow CTAN documentation to fill out everything correctly.\n        name: Submit to CTAN (first release)\n        if: ${{ steps.labeller.outputs.version == '1.0.0' }}\n        uses: paolobrasolin/ctan-submit-action@v1\n        with:\n          action: upload\n          file_path: dist/foobar-${{ steps.labeller.outputs.version }}.zip\n          fields: |\n            update: \"false\"\n            pkg: foobar\n            version: ${{ steps.labeller.outputs.version }}\n            uploader: Paolo Brasolin\n            email: paolo.brasolin@gmail.com\n            author: Paolo Brasolin\n            license: mit\n            ctanPath: /graphics/pgf/contrib/foobar\n            topic: diagram\n            home: https://paolobrasolin.github.io/foobar/\n            bugs: https://github.com/paolobrasolin/foobar/issues\n            repository: https://github.com/paolobrasolin/foobar\n            summary: \u003e\n              Foobar: foobars for TeX\n            description: \u003e\n              Foobar is a TikZ library. Its aim is making foobars more approachable for people using TikZ to draw them.\n            note: \u003e\n              Extra relevant topics are: diagram-maths maths pgf-tikz\n\n      - # This step is executed on all subsequent submissions of your package to CTAN. In fact, this is simply an update to an existing package.\n        name: Submit to CTAN (update)\n        if: ${{ steps.labeller.outputs.version != '1.0.0' }}\n        uses: paolobrasolin/ctan-submit-action@v1\n        with:\n          action: upload\n          file_path: dist/foobar-${{ steps.labeller.outputs.version }}.zip\n          fields: |\n            update: \"true\"\n            pkg: foobar\n            version: ${{ steps.labeller.outputs.version }}\n            uploader: Paolo Brasolin\n            email: paolo.brasolin@gmail.com\n```\n\n### Other examples\n\nHere is the list of all projects using this action: https://github.com/paolobrasolin/ctan-submit-action/network/dependents\n\nYou can peek at their CI setup to find other live examples and learn more about how it can be used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaolobrasolin%2Fctan-submit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaolobrasolin%2Fctan-submit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaolobrasolin%2Fctan-submit-action/lists"}