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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI

on:
pull_request:
branches: [master, development]
branches: [main, development]
workflow_dispatch:

permissions:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release: on every push to master, builds Release and pushes the DSoft.*.nupkg
# package (with its .snupkg symbols) to nuget.org as 4.0.yyMM.<run number>, then
# Release: on every push to main, builds Release and pushes the DSoft.*.nupkg
# package (with its .snupkg symbols) to nuget.org as 4.0.yyMM.<run number + 100>, then
# tags the commit and creates a GitHub release with the package attached.
# RELEASE_SUFFIX is empty for a stable version; set it to a suffix such as
# '-prerelease' to publish a prerelease.
Expand All @@ -8,7 +8,7 @@ name: Release

on:
push:
branches: [master]
branches: [main]
paths-ignore:
- '**.md'
- '.github/workflows/**'
Expand Down Expand Up @@ -42,7 +42,10 @@ jobs:
id: version
shell: bash
run: |
version="4.0.$(date -u +%y%m).${{ github.run_number }}"
# The run number is offset by 100 so the first GitHub release sorts above 4.0.2610.91, the
# last version Azure Pipelines published. The run number never resets, so the offset is
# permanent and harmless.
version="4.0.$(date -u +%y%m).$(( ${{ github.run_number }} + 100 ))"
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "package=$version$RELEASE_SUFFIX" >> "$GITHUB_OUTPUT"
echo "Version: $version$RELEASE_SUFFIX"
Expand Down
2 changes: 1 addition & 1 deletion DSoft.System.BluetoothLe/DSoft.System.BluetoothLe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true' Or '$(TF_BUILD)' == 'true'">true</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Packing on every Debug build costs time and produces artefacts nobody consumes. -->
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ remaining seven target frameworks build and the two Windows ones are skipped.

GitHub Actions (`.github/workflows/`):

- `ci.yml`: runs on pull requests to `master` and `development`. Builds Release for every target framework. Publishes nothing.
- `release.yml`: runs on every push to `master` (changes only to Markdown or workflow files are skipped; run it by hand to test a workflow change). Builds Release as `4.0.yyMM.<run number>` plus `RELEASE_SUFFIX` (empty for a stable version; set it to `-prerelease` in the workflow to publish a prerelease), uploads the package as the `drop` artifact and pushes it to nuget.org with Trusted Publishing (OIDC, `NUGET_USER` secret, `nuget` environment), then tags the commit `v<version>` and creates a GitHub release with the package attached. `AssemblyVersion` is not stamped by CI: it stays pinned in the project file (see "Strong naming").
- `ci.yml`: runs on pull requests to `main` and `development`. Builds Release for every target framework. Publishes nothing.
- `release.yml`: runs on every push to `main` (changes only to Markdown or workflow files are skipped; run it by hand to test a workflow change). Builds Release as `4.0.yyMM.<run number + 100>` plus `RELEASE_SUFFIX` (empty for a stable version; set it to `-prerelease` in the workflow to publish a prerelease), uploads the package as the `drop` artifact and pushes it to nuget.org with Trusted Publishing (OIDC, `NUGET_USER` secret, `nuget` environment), then tags the commit `v<version>` and creates a GitHub release with the package attached. `AssemblyVersion` is not stamped by CI: it stays pinned in the project file (see "Strong naming").

### Strong naming

Expand Down
Loading