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
- Commit
.github/workflows/csharp-ci.yml. - Push to GitHub.
- Open the repository’s Actions tab.
- Open the workflow run.
- Watch the individual steps.
- Download the produced artifact.
- Compare the experience with Jenkins and Azure Pipelines.