An open API service indexing awesome lists of open source software.

https://github.com/smashedr/typescript-action

TypeScript Action Template using Rollup
https://github.com/smashedr/typescript-action

github-actions typescript

Last synced: about 1 month ago
JSON representation

TypeScript Action Template using Rollup

Awesome Lists containing this project

README

          

[![GitHub Tag Major](https://img.shields.io/github/v/tag/smashedr/typescript-action?sort=semver&filter=!v*.*&logo=git&logoColor=white&labelColor=585858&label=%20)](https://github.com/smashedr/typescript-action/tags)
[![GitHub Tag Minor](https://img.shields.io/github/v/tag/smashedr/typescript-action?sort=semver&filter=!v*.*.*&logo=git&logoColor=white&labelColor=585858&label=%20)](https://github.com/smashedr/typescript-action/releases)
[![GitHub Release Version](https://img.shields.io/github/v/release/smashedr/typescript-action?logo=git&logoColor=white&labelColor=585858&label=%20)](https://github.com/smashedr/typescript-action/releases/latest)
[![GitHub Dist Size](https://img.shields.io/github/size/smashedr/typescript-action/dist%2Findex.js?logo=bookstack&logoColor=white&label=dist%20size)](https://github.com/smashedr/typescript-action/blob/master/src)
[![Workflow Release](https://img.shields.io/github/actions/workflow/status/smashedr/typescript-action/release.yaml?logo=checkmarx&logoColor=white&label=release)](https://github.com/smashedr/typescript-action/actions/workflows/release.yaml)
[![Workflow Test](https://img.shields.io/github/actions/workflow/status/smashedr/typescript-action/test.yaml?logo=checkmarx&logoColor=white&label=test)](https://github.com/smashedr/typescript-action/actions/workflows/test.yaml)
[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/smashedr/typescript-action/lint.yaml?logo=checkmarx&logoColor=white&label=lint)](https://github.com/smashedr/typescript-action/actions/workflows/lint.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=smashedr_typescript-action&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=smashedr_typescript-action)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/smashedr/typescript-action?logo=github&label=updated)](https://github.com/smashedr/typescript-action)
[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/shaner/typescript-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F&logo=codeberg&logoColor=white&label=updated)](https://codeberg.org/shaner/typescript-action)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/smashedr/typescript-action?logo=buffer&label=repo%20size)](https://github.com/smashedr/typescript-action?tab=readme-ov-file#readme)
[![GitHub Top Language](https://img.shields.io/github/languages/top/smashedr/typescript-action?logo=devbox)](https://github.com/smashedr/typescript-action?tab=readme-ov-file#readme)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/smashedr/typescript-action?logo=southwestairlines)](https://github.com/smashedr/typescript-action/graphs/contributors)
[![GitHub Issues](https://img.shields.io/github/issues/smashedr/typescript-action?logo=codeforces&logoColor=white)](https://github.com/smashedr/typescript-action/issues)
[![GitHub Discussions](https://img.shields.io/github/discussions/smashedr/typescript-action?logo=rocketdotchat&logoColor=white)](https://github.com/smashedr/typescript-action/discussions)
[![GitHub Forks](https://img.shields.io/github/forks/smashedr/typescript-action?style=flat&logo=forgejo&logoColor=white)](https://github.com/smashedr/typescript-action/forks)
[![GitHub Repo Stars](https://img.shields.io/github/stars/smashedr/typescript-action?style=flat&logo=gleam&logoColor=white)](https://github.com/smashedr/typescript-action/stargazers)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=apachespark&logoColor=white&label=org%20stars)](https://cssnr.github.io/)
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr)

# TypeScript Action Template


TypeScript Action Template

- [Features](#Features)
- [Inputs](#Inputs)
- [Permissions](#Permissions)
- [Outputs](#Outputs)
- [Examples](#Examples)
- [Tags](#Tags)
- [Support](#Support)
- [Contributing](#Contributing)

TypeScript Action Template using Rollup.

- JavaScript: https://github.com/smashedr/javascript-action
- TypeScript: https://github.com/smashedr/typescript-action
- Dockerfile Python: https://github.com/smashedr/py-test-action
- Dockerfile Python UV: https://github.com/smashedr/test-action-uv
- Docker Image Python: https://github.com/smashedr/docker-test-action

## Features

This action creates or updates the provided `tag` to the `sha` has that triggered the workflow.

This includes inputs, outputs, job summary, and automatic token authentication.

## Inputs

| Input | Req. | Default | Input Description |
| :---------- | :--: | :------------: | :---------------------- |
| **tag** | - | `test` | Tag to Create or Update |
| **summary** | - | `true` | Add Summary to Job |
| **token** | - | `github.token` | Only for PAT |

```yaml
- name: 'TypeScript Action Template'
uses: smashedr/typescript-action@master
with:
tag: test
```

### Permissions

This action requires the following permissions:

```yaml
permissions:
contents: write
```

Permissions documentation for [Workflows](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token) and [Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication).

## Outputs

| Output | Description |
| :------ | :---------- |
| **sha** | Tag Hash |

```yaml
- name: 'TypeScript Action Template'
id: test
uses: smashedr/typescript-action@master
with:
tag: test

- name: 'Echo Output'
run: |
echo "sha: '${{ steps.test.outputs.sha }}'"
```

## Examples

💡 _Click on an example heading to expand or collapse the example._

```yaml
name: 'Test'

on:
workflow_dispatch:
push:

jobs:
test:
name: 'Test'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write

steps:
- name: 'Checkout'
uses: actions/checkout@v6

- name: 'TypeScript Action'
id: test
uses: smashedr/typescript-action@master

- name: 'Echo Outputs'
run: |
echo "sha: '${{ steps.test.outputs.sha }}'"
```

For more examples, you can check out other projects using this action:
https://github.com/smashedr/typescript-action/network/dependents

## Tags

The following rolling [tags](https://github.com/smashedr/typescript-action/tags) are maintained.

| Version Tag | Rolling | Bugs | Feat. | Name | Target | Example |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :--: | :---: | :-------: | :------: | :------- |
| [![GitHub Tag Major](https://img.shields.io/github/v/tag/smashedr/typescript-action?sort=semver&filter=!v*.*&style=for-the-badge&label=%20&color=44cc10)](https://github.com/smashedr/typescript-action/releases/latest) | ✅ | ✅ | ✅ | **Major** | `vN.x.x` | `vN` |
| [![GitHub Tag Minor](https://img.shields.io/github/v/tag/smashedr/typescript-action?sort=semver&filter=!v*.*.*&style=for-the-badge&label=%20&color=blue)](https://github.com/smashedr/typescript-action/releases/latest) | ✅ | ✅ | ❌ | **Minor** | `vN.N.x` | `vN.N` |
| [![GitHub Release](https://img.shields.io/github/v/release/smashedr/typescript-action?style=for-the-badge&label=%20&color=red)](https://github.com/smashedr/typescript-action/releases/latest) | ❌ | ❌ | ❌ | **Micro** | `vN.N.N` | `vN.N.N` |

You can view the release notes for each version on the [releases](https://github.com/smashedr/typescript-action/releases) page.

The **Major** tag is recommended. It is the most up-to-date and always backwards compatible.
Breaking changes would result in a **Major** version bump. At a minimum you should use a **Minor** tag.

# Support

If you run into any issues or need help getting started, please do one of the following:

- [Report an Issue](https://github.com/smashedr/typescript-action/issues)
- [Q&A Discussion](https://github.com/smashedr/typescript-action/discussions/categories/q-a)
- [Request a Feature](https://github.com/smashedr/typescript-action/issues/new?template=1-feature.yaml)
- [Chat with us on Discord](https://discord.gg/wXy6m2X8wY)

[![Features](https://img.shields.io/badge/features-brightgreen?style=for-the-badge&logo=rocket&logoColor=white)](https://github.com/smashedr/typescript-action/issues/new?template=1-feature.yaml)
[![Issues](https://img.shields.io/badge/issues-red?style=for-the-badge&logo=southwestairlines&logoColor=white)](https://github.com/smashedr/typescript-action/issues)
[![Discussions](https://img.shields.io/badge/discussions-blue?style=for-the-badge&logo=livechat&logoColor=white)](https://github.com/smashedr/typescript-action/discussions)
[![Discord](https://img.shields.io/badge/discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/wXy6m2X8wY)

# Contributing

If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).

Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.

[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)

[![Actions Tools](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/actions/actions-tools.png)](https://actions-tools.cssnr.com/)

Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/) I have published:

- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
- [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)
- [Rhysd Actionlint Action](https://github.com/cssnr/actionlint-action?tab=readme-ov-file#readme)
- [Zensical Action](https://github.com/cssnr/zensical-action?tab=readme-ov-file#readme)
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
- [Homebrew Action](https://github.com/cssnr/homebrew-action?tab=readme-ov-file#readme)
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
- [TOML Action](https://github.com/cssnr/toml-action?tab=readme-ov-file#readme)
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)
- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)
- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)
- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)
- [Create Pull Action](https://github.com/cssnr/create-pull-action?tab=readme-ov-file#readme)
- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)
- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)
- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)
- [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)

❔ Unpublished Actions

These actions are not published on the Marketplace, but may be useful.

- [cssnr/create-files-action](https://github.com/cssnr/create-files-action?tab=readme-ov-file#readme) - Create various files from templates.
- [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.
- [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.
- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.

---

📝 Template Actions

These are basic action templates that I use for creating new actions.

- [javascript-action](https://github.com/smashedr/javascript-action?tab=readme-ov-file#readme) - JavaScript
- [typescript-action](https://github.com/smashedr/typescript-action?tab=readme-ov-file#readme) - TypeScript
- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Dockerfile Python
- [test-action-uv](https://github.com/smashedr/test-action-uv?tab=readme-ov-file#readme) - Dockerfile Python UV
- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker Image Python

Note: The `docker-test-action` builds, runs and pushes images to [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).

---

For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)