Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

###############################################################################
# Keep shell scripts and CI YAML LF-only for the Linux CI runners, regardless
# of the checkout platform's autocrlf setting.
###############################################################################
*.sh text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
22 changes: 22 additions & 0 deletions .github/actions/ci-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI — .NET
description: >
Restore and Release-build ESI.NET across every target framework. Runs on
Linux; the net46x/net47x/net48 targets build against the .NET Framework
reference assemblies the SDK restores, no Mono needed. Assumes the repo is
already checked out.

runs:
using: composite
steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'

- name: Restore
shell: bash
run: dotnet restore ESI.NET.sln

- name: Build (Release, all target frameworks)
shell: bash
run: dotnet build ESI.NET.sln --configuration Release --no-restore
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Dependabot version updates. Each ecosystem is grouped, so a run opens at most
# one PR per ecosystem (plus stragglers that can't be grouped). PRs target `dev`
# — the integration branch, where CI (ci-dev.yml) runs. Security alerts are a
# separate repo setting and open PRs only for actual advisories.
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
target-branch: dev
schedule:
interval: weekly
commit-message:
prefix: ci
groups:
actions:
patterns:
- "*"

- package-ecosystem: nuget
directory: "/ESI.NET"
target-branch: dev
schedule:
interval: weekly
commit-message:
prefix: deps
groups:
nuget:
patterns:
- "*"
# Majors (Microsoft.IdentityModel 7.x/8.x, Microsoft.Extensions.* 9.x, …)
# tend to need code changes — take those by hand; grouped minor/patch keep
# the package graph fresh in the meantime.
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-major
29 changes: 0 additions & 29 deletions .github/workflows/build-check.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI (dev)

# Per-commit coverage on the long-lived dev branch, so a break is pinned to the
# commit that caused it instead of surfacing across a whole delta at PR time.
# Separate workflow (not the `check` context) so it never touches the dev->master
# PR gate. Skips doc-only pushes.
on:
push:
branches: [dev]
paths-ignore:
- 'docs/**'
- '**.md'

concurrency:
group: ci-dev-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/ci-dotnet
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

# PR gate for both branches: dev->master (the release gate) and feature->dev
# (contributor PRs). The `check` job aggregates the build and is the required
# status check on master (branch protection) — keep its name stable.
on:
pull_request:
branches: [master, dev]

# Newer commits on the PR branch supersede an in-flight run.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/ci-dotnet

check:
needs: [build]
runs-on: ubuntu-latest
steps:
- run: echo "build passed"
96 changes: 0 additions & 96 deletions .github/workflows/deploy.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Release

# Fires on every push to master — i.e. every dev->master merge — and publishes a
# release: a CalVer version from today's date + existing tags, the NuGet package
# pushed to nuget.org, and a GitHub Release (which creates the tag). Doc-only and
# CI-only merges are skipped (paths-ignore); to opt any other merge out, put
# "[skip release]" in the merge-commit message. workflow_dispatch stays for
# manual drafts / re-runs — a draft build packs and attaches the .nupkg but does
# not push to NuGet.
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- '**.md'
- '.github/**'
workflow_dispatch:
inputs:
draft:
description: "Draft: pack + attach the .nupkg, but don't push to NuGet"
type: boolean
default: false

# One release at a time; never cancel a run that may have already published.
concurrency:
group: release
cancel-in-progress: false

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
# push: skip when the merge commit opts out. dispatch: always run.
if: >-
github.event_name == 'workflow_dispatch' ||
!contains(github.event.head_commit.message, '[skip release]')

steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0 # need all tags so the CalVer build segment is correct

- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'

- name: Compute version
id: version
shell: bash
run: echo "value=$(bash scripts/compute-version.sh)" >> "$GITHUB_OUTPUT"

- name: Pack
shell: bash
run: >-
dotnet pack ESI.NET/ESI.NET.csproj
--configuration Release
--output ./nupkgs
-p:Version=${{ steps.version.outputs.value }}
-p:ContinuousIntegrationBuild=true

- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./nupkgs/*.nupkg

- name: Push to NuGet.org
if: ${{ !inputs.draft }}
shell: bash
run: >-
dotnet nuget push "nupkgs/*.nupkg"
--api-key ${{ secrets.NUGET_API_KEY }}
--source https://api.nuget.org/v3/index.json
--skip-duplicate

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.value }}
name: ESI.NET ${{ steps.version.outputs.value }}
draft: ${{ inputs.draft || false }}
generate_release_notes: true
files: ./nupkgs/*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Send Discord webhook
if: ${{ success() && !inputs.draft }}
env:
DISCORD_WEBHOOK: ${{ github.event_name == 'workflow_dispatch' && secrets.DISCORD_TEST_WEBHOOK_URL || secrets.DISCORD_WEBHOOK_URL }}
uses: Ilshidur/action-discord@0.3.2
with:
args: |
**ESI.NET ${{ steps.version.outputs.value }} NuGet package released**
17 changes: 3 additions & 14 deletions ESI.NET/ESI.NET.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Globals">
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0;net462;net47;net471;net472;net48;net6.0;net7.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2023.12.12</Version>
<!-- Dev placeholder. Real versions are CalVer, computed and stamped in CI
(scripts/compute-version.sh + .github/workflows/release.yml). -->
<Version>0.0.0-dev</Version>
<Authors>Psianna Archeia</Authors>
<Company>Sukebe Corporation</Company>
<Description>.NET Wrapper for the Eve Online API</Description>
Expand Down Expand Up @@ -40,10 +35,4 @@
</None>
</ItemGroup>

<ItemGroup>
<None Update="GetBuildVersion.psm1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Loading
Loading