v0.2.0
Generate Github Actions Workflow Yaml from a simple declarative syntax in typescript π οΈ π» β¨
Attributes
Popular
Includes Deno configuration
Repository
Current version released
a year ago
Fluent Github Actions
Fluent Github Actions is a deno module for generating Github Actions Workflow configuration files easily and fluently.
π Usage
import {
Workflow,
JobSpec,
} from "https://deno.land/x/fluent_github_actions@v0.1.1/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");