https://github.com/tsirysndr/fluent-github-actions
Generate Github Actions Workflow Yaml from a simple declarative syntax in typescript 🛠️ 💻 ✨
https://github.com/tsirysndr/fluent-github-actions
deno github-actions typescript workflow
Last synced: 2 months ago
JSON representation
Generate Github Actions Workflow Yaml from a simple declarative syntax in typescript 🛠️ 💻 ✨
- Host: GitHub
- URL: https://github.com/tsirysndr/fluent-github-actions
- Owner: tsirysndr
- License: mit
- Created: 2023-08-13T06:27:14.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T21:42:18.000Z (over 2 years ago)
- Last Synced: 2025-02-26T20:03:29.323Z (over 1 year ago)
- Topics: deno, github-actions, typescript, workflow
- Language: TypeScript
- Homepage:
- Size: 55.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Fluent Github Actions
[](https://deno.land/x/fluent_github_actions)

[](https://codecov.io/gh/tsirysndr/fluent-github-actions)
Fluent Github Actions is a deno module for generating Github Actions Workflow configuration files easily and fluently.
## 🚀 Usage
```typescript
import {
Workflow,
JobSpec,
} from "https://deno.land/x/fluent_github_actions@v0.2.0/mod.ts";
const workflow = new Workflow("Codecov");
const push = {
branches: ["master"],
};
const test: JobSpec = {
"runs-on": "ubuntu-latest",
steps: [
{
uses: "actions/checkout@v2",
},
{
uses: "denolib/setup-deno@v2",
with: {
"deno-version": "v1.34",
},
},
{
name: "Create coverage files",
run: "deno test --coverage=coverage",
},
{
name: "Create coverage report",
run: "deno coverage ./coverage --lcov > coverage.lcov",
},
{
name: "Collect coverage",
uses: "codecov/codecov-action@v3",
env: {
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}",
},
with: {
file: "./coverage.lcov",
},
},
],
};
workflow.on({ push }).jobs({ test });
console.log(workflow.toString());
workflow.save("./.github/workflows/codecov.yml");
```