{"id":23521491,"url":"https://github.com/tubone24/update_release","last_synced_at":"2025-04-19T19:43:12.577Z","repository":{"id":37000563,"uuid":"294598451","full_name":"tubone24/update_release","owner":"tubone24","description":"This GitHub Action (written in JavaScript) is to change the Body Text and Name of an already created Release with using the GitHub Release API.","archived":false,"fork":false,"pushed_at":"2024-12-11T15:49:13.000Z","size":1497,"stargazers_count":16,"open_issues_count":22,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-16T04:35:08.802Z","etag":null,"topics":["github-actions","github-releases"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/update-github-release","language":"TypeScript","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/tubone24.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-11T04:59:54.000Z","updated_at":"2024-12-13T09:28:27.000Z","dependencies_parsed_at":"2023-09-26T03:27:30.486Z","dependency_job_id":"574992dd-bf29-4bd6-b1db-c0d97d336cf8","html_url":"https://github.com/tubone24/update_release","commit_stats":{"total_commits":389,"total_committers":34,"mean_commits":"11.441176470588236","dds":0.5089974293059125,"last_synced_commit":"1cfa79ccf7422570d9a9c6b6de749ff4b280e48b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Fupdate_release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Fupdate_release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Fupdate_release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Fupdate_release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tubone24","download_url":"https://codeload.github.com/tubone24/update_release/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231260784,"owners_count":18349461,"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":["github-actions","github-releases"],"created_at":"2024-12-25T17:12:23.510Z","updated_at":"2024-12-25T17:12:23.973Z","avatar_url":"https://github.com/tubone24.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update_release (GitHub Release API)\n\n[![Release Version](https://release-badges-generator.vercel.app/api/releases.svg?user=tubone24\u0026repo=update_release\u0026gradient=ff6600,ffe500)](https://github.com/tubone24/update_release/releases/latest)\n[![Actions Status](https://github.com/tubone24/update_release/workflows/Test%20and%20Build/badge.svg)](https://github.com/tubone24/update_release/actions)\n[![Coverage Status](https://coveralls.io/repos/github/tubone24/update_release/badge.svg?branch=master)](https://coveralls.io/github/tubone24/update_release?branch=master)\n[![license](https://img.shields.io/github/license/tubone24/update_release.svg)](LICENSE)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nThis GitHub Action (written in JavaScript) is to change the Body Text and Name of an already created Release with using the GitHub Release API.\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [Demos](#demos)\n- [Test](#Test)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Install\n\n### Pre-requisites\n\nCreate a workflow `.yml` file in your .github/workflows directory. \n\n[An example workflow](https://github.com/tubone24/update_release#example-workflow---update-a-release) is available below. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#creating-a-workflow-file).\n\n## Usage\n\n### Inputs\n\nChange GitHub Releases, if you set the inputs. \n\n- release_name\n  - If this item is set, the release name is overridden.\n- body\n  - If this item is set, the body text is overridden.\n- draft\n  - If this item is set, the draft is overridden.\n- prerelease\n  - If this item is set, the prerelease is overridden.\n- is_append_body\n  - If true, append body text on old one.\n- body_path\n  - Path to file with new body text.\n\n### Outputs\n- id\n  - The release ID\n- html_url\n  - The URL users can navigate to in order to view the release. i.e. https://github.com/octocat/Hello-World/releases/v1.0.0\n- upload_url\n  - The URL for uploading assets to the release, which could be used by GitHub Actions for additional uses, for example the [@actions/upload-release-asset](https://github.com/actions/upload-release-asset) GitHub Action\n\n### Environment variables\n- GITHUB_TOKEN\n  - The github auth token (mandatory)\n- TAG_NAME\n  - The name of the tag a release is searched for. If not set context.ref will be used instead.\n\n### Example workflow - update a release\n\n```\nname: Release\n\non:\n  release:\n    types: [created]\n\njobs:\n  build:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n          - os: ubuntu-latest\n            asset_name_suffix: ''\n            asset_content_type: application/octet-stream\n          - os: windows-latest\n            asset_name_suffix: .exe\n            asset_content_type: application/octet-stream\n          - os: macOS-latest\n            asset_name_suffix: ''\n            asset_content_type: application/octet-stream\n    steps:\n      - uses: actions/checkout@v1\n      - uses: tubone24/setup-nim-action@v1.0.1\n      - name: Install Dependencies\n        run: nimble install -d --accept\n      - name: Build\n        run: nimble build -d:release\n      - name: get version\n        id: get_version\n        run: |\n          echo ::set-output name=VERSION::${GITHUB_REF/refs\\/tags\\//}\n      - name: update release\n        id: update_release\n        uses: tubone24/update_release@v1.0\n        env:\n          GITHUB_TOKEN: ${{ github.token }}\n        with:\n          body: test_body # new body text\n      - name: Upload Release Asset\n        uses: actions/upload-release-asset@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.github_token }}\n        with:\n          upload_url: ${{ steps.update_release.outputs.upload_url }}\n          asset_path: ./bin/post_twitter_on_work${{ matrix.asset_name_suffix }}\n          asset_name: post_twitter_on_work_${{ runner.os }}_${{ steps.get_version.outputs.VERSION }}${{ matrix.asset_name_suffix }}\n          asset_content_type: ${{ matrix.asset_content_type }}\n```\n\n`on-release-created` is a event to create a release and you can get release id on the actions. Also changed body text.\n\nThis uses the GITHUB_TOKEN provided by the [virtual environment](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#github_token-secret), so no new token is needed.\n\n## Demos\n\nSee the repo:\n\n\u003chttps://github.com/tubone24/post_twitter_on_work\u003e\n\n## Test\n\nIf you modify this codes, run unit test with `jest`.\n\n```\nnpm test\n```\n\nAlso, this repo is integrated with GitHub Action.\n\nSo, Run CI test, if you write test.\n\n\n## Contributing\n\nSee [the contributing file](CONTRIBUTING.md)!\n\nPRs accepted.\n\nSmall note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT © tubone.](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubone24%2Fupdate_release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftubone24%2Fupdate_release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubone24%2Fupdate_release/lists"}