{"id":19680350,"url":"https://github.com/touchlab/website-version-replace","last_synced_at":"2025-07-03T02:03:30.716Z","repository":{"id":234016530,"uuid":"696465538","full_name":"touchlab/website-version-replace","owner":"touchlab","description":"For our websites, we use a simple template to replace strings. This plugin does that without running Gradle, etc.","archived":false,"fork":false,"pushed_at":"2023-12-19T03:00:48.000Z","size":335,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T06:48:54.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/touchlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-25T19:51:28.000Z","updated_at":"2023-09-25T19:51:33.000Z","dependencies_parsed_at":"2024-04-19T17:47:51.232Z","dependency_job_id":null,"html_url":"https://github.com/touchlab/website-version-replace","commit_stats":null,"previous_names":["touchlab/website-version-replace"],"tags_count":0,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/touchlab/website-version-replace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2Fwebsite-version-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2Fwebsite-version-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2Fwebsite-version-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2Fwebsite-version-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/touchlab","download_url":"https://codeload.github.com/touchlab/website-version-replace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchlab%2Fwebsite-version-replace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245241,"owners_count":23436510,"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":[],"created_at":"2024-11-11T18:04:48.182Z","updated_at":"2025-07-03T02:03:30.674Z","avatar_url":"https://github.com/touchlab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create a JavaScript Action Using TypeScript\n\n[![GitHub Super-Linter](https://github.com/actions/typescript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/actions/typescript-action/actions/workflows/ci.yml/badge.svg)\n\nUse this template to bootstrap the creation of a TypeScript action. :rocket:\n\nThis template includes compilation support, tests, a validation workflow,\npublishing, and versioning guidance.\n\nIf you are new, there's also a simpler introduction in the\n[Hello world JavaScript action repository](https://github.com/actions/hello-world-javascript-action).\n\n## Create Your Own Action\n\nTo create your own action, you can use this repository as a template! Just\nfollow the below instructions:\n\n1. Click the **Use this template** button at the top of the repository\n1. Select **Create a new repository**\n1. Select an owner and name for your new repository\n1. Click **Create repository**\n1. Clone your new repository\n\n## Initial Setup\n\nAfter you've cloned the repository to your local machine or codespace, you'll\nneed to perform some initial setup steps before you can develop your action.\n\n\u003e [!NOTE]\n\u003e\n\u003e You'll need to have a reasonably modern version of\n\u003e [Node.js](https://nodejs.org) handy. If you are using a version manager like\n\u003e [`nodenv`](https://github.com/nodenv/nodenv) or\n\u003e [`nvm`](https://github.com/nvm-sh/nvm), you can run `nodenv install` in the\n\u003e root of your repository to install the version specified in\n\u003e [`package.json`](./package.json). Otherwise, 20.x or later should work!\n\n1. :hammer_and_wrench: Install the dependencies\n\n   ```bash\n   npm install\n   ```\n\n1. :building_construction: Package the TypeScript for distribution\n\n   ```bash\n   npm run bundle\n   ```\n\n1. :white_check_mark: Run the tests\n\n   ```bash\n   $ npm test\n\n   PASS  ./index.test.js\n     ✓ throws invalid number (3ms)\n     ✓ wait 500 ms (504ms)\n     ✓ test runs (95ms)\n\n   ...\n   ```\n\n## Update the Action Metadata\n\nThe [`action.yml`](action.yml) file defines metadata about your action, such as\ninput(s) and output(s). For details about this file, see\n[Metadata syntax for GitHub Actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions).\n\nWhen you copy this repository, update `action.yml` with the name, description,\ninputs, and outputs for your action.\n\n## Update the Action Code\n\nThe [`src/`](./src/) directory is the heart of your action! This contains the\nsource code that will be run when your action is invoked. You can replace the\ncontents of this directory with your own code.\n\nThere are a few things to keep in mind when writing your action code:\n\n- Most GitHub Actions toolkit and CI/CD operations are processed asynchronously.\n  In `main.ts`, you will see that the action is run in an `async` function.\n\n  ```javascript\n  import * as core from '@actions/core'\n  //...\n\n  async function run() {\n    try {\n      //...\n    } catch (error) {\n      core.setFailed(error.message)\n    }\n  }\n  ```\n\n  For more information about the GitHub Actions toolkit, see the\n  [documentation](https://github.com/actions/toolkit/blob/master/README.md).\n\nSo, what are you waiting for? Go ahead and start customizing your action!\n\n1. Create a new branch\n\n   ```bash\n   git checkout -b releases/v1\n   ```\n\n1. Replace the contents of `src/` with your action code\n1. Add tests to `__tests__/` for your source code\n1. Format, test, and build the action\n\n   ```bash\n   npm run all\n   ```\n\n   \u003e [!WARNING]\n   \u003e\n   \u003e This step is important! It will run [`ncc`](https://github.com/vercel/ncc)\n   \u003e to build the final JavaScript action code with all dependencies included.\n   \u003e If you do not run this step, your action will not work correctly when it is\n   \u003e used in a workflow. This step also includes the `--license` option for\n   \u003e `ncc`, which will create a license file for all of the production node\n   \u003e modules used in your project.\n\n1. Commit your changes\n\n   ```bash\n   git add .\n   git commit -m \"My first action is ready!\"\n   ```\n\n1. Push them to your repository\n\n   ```bash\n   git push -u origin releases/v1\n   ```\n\n1. Create a pull request and get feedback on your action\n1. Merge the pull request into the `main` branch\n\nYour action is now published! :rocket:\n\nFor information about versioning your action, see\n[Versioning](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\nin the GitHub Actions toolkit.\n\n## Validate the Action\n\nYou can now validate the action by referencing it in a workflow file. For\nexample, [`ci.yml`](./.github/workflows/ci.yml) demonstrates how to reference an\naction in the same repository.\n\n```yaml\nsteps:\n  - name: Checkout\n    id: checkout\n    uses: actions/checkout@v3\n\n  - name: Test Local Action\n    id: test-action\n    uses: ./\n    with:\n      milliseconds: 1000\n\n  - name: Print Output\n    id: output\n    run: echo \"${{ steps.test-action.outputs.time }}\"\n```\n\nFor example workflow runs, check out the\n[Actions tab](https://github.com/actions/typescript-action/actions)! :rocket:\n\n## Usage\n\nAfter testing, you can create version tag(s) that developers can use to\nreference different stable versions of your action. For more information, see\n[Versioning](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\nin the GitHub Actions toolkit.\n\nTo include the action in a workflow in another repository, you can use the\n`uses` syntax with the `@` symbol to reference a specific branch, tag, or commit\nhash.\n\n```yaml\nsteps:\n  - name: Checkout\n    id: checkout\n    uses: actions/checkout@v3\n\n  - name: Test Local Action\n    id: test-action\n    uses: actions/typescript-action@v1 # Commit with the `v1` tag\n    with:\n      milliseconds: 1000\n\n  - name: Print Output\n    id: output\n    run: echo \"${{ steps.test-action.outputs.time }}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchlab%2Fwebsite-version-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftouchlab%2Fwebsite-version-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchlab%2Fwebsite-version-replace/lists"}