What you’ll learn

  • GitHub Actions workflows, jobs, steps, and runners.
  • Build/test/publish the same C# application.

When you’re finished

  • Produce and download a GitHub Actions artifact.
  • Compare Actions terminology with Jenkins and Azure Pipelines.

Reuse jenkins-csharp-demo.

8.1 Workflow concepts

GitHub Actions stores workflow YAML files in:

.github/workflows/

A workflow contains one or more jobs. Each job runs on a runner and contains steps.

Minimal structure:

name: C# CI

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v6

Concept mapping:

Jenkins GitHub Actions
Jenkinsfile .github/workflows/*.yml
Agent Runner
Stage/job Job
Step Step
Credentials Secrets / environments
Build trigger Event

8.2 Build, test, and publish

The workflow performs the same logical operations:

Checkout → Setup .NET → Restore → Build → Test → Publish → Upload Artifact

The complete file is in Appendix E.

8.2.1 Exercise

  1. Commit .github/workflows/csharp-ci.yml.
  2. Push to GitHub.
  3. Open the repository’s Actions tab.
  4. Open the workflow run.
  5. Watch the individual steps.
  6. Download the produced artifact.
  7. Compare the experience with Jenkins and Azure Pipelines.