Files
Faris Laptop 7e80226bf2
CI / build (push) Successful in 39s
Release / release (push) Failing after 36s
ci: release from the production branch, version from the project file
Two branches: dev for everyday work, production for releases.

- ci.yml builds and packs on dev and on pull requests; it never publishes.
- release.yml runs on a push (usually a merge) into production: reads
  <Version> from the csproj, refuses to proceed if that tag already
  exists, publishes to nuget.org, and only then creates the tag and the
  Gitea release — so a tag always means a published package.
- Drop --skip-duplicate: a duplicate push must fail loudly instead of
  reporting success while shipping nothing.
2026-07-20 16:12:21 +05:00

36 lines
917 B
YAML

name: CI
# Everyday checks. Runs on the working branch and on pull requests into it.
# Releasing is a separate workflow driven by the production branch.
on:
push:
branches: [dev]
pull_request:
branches: [dev, production]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Restore
run: dotnet restore
# Directory.Build.props turns warnings into errors, so this gates style too.
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack
run: dotnet pack src/CertifiEd.Client/CertifiEd.Client.csproj --configuration Release --no-build --output artifacts
- name: Upload package artifacts
uses: actions/upload-artifact@v3
with:
name: nupkg
path: artifacts/*