- Notifications
You must be signed in to change notification settings - Fork 0
Re-sync shared artifacts from template#190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ce38eed
Conform orchestration workflows to template
ptr727 5ef655e
Carry whole .editorconfig and CODESTYLE.md from template
ptr727 a689ebf
Pin LanguageData/iso6392 to LF and normalize (EOL-only)
ptr727 e5cc78a
Document template adaptations in AGENTS.md
ptr727 2394e73
Re-carry genericized CODESTYLE; pin .husky/pre-commit LF; restore dat…
ptr727 ad13959
Adapt CODESTYLE task list and git-hook note to Husky.Net
ptr727 4cf6761
Adapt CODESTYLE InternalsVisibleTo and CI backstop to repo
ptr727 ca5ab04
Re-carry self-contained CODESTYLE; add expect_release_assets gate
ptr727 a694521
Preserve LanguageData as-downloaded: drop iso6392 EOL override + revert
ptr727 0452ee3
Re-carry portable CODESTYLE; align CI-backstop/task/hooks wording
ptr727 cfa8dcb
Re-carry AGENTS contract sections verbatim from template
ptr727 48a9567
Re-fan template doc/pin fixes from convergence re-review
ptr727 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,22 @@ | ||
| # Leave line endings alone | ||
| # git config --global core.autocrlf false | ||
| # git add --renormalize . | ||
| # git ls-files --eol | ||
| * -text | ||
| # Default: do not normalize line endings (`* -text`); .editorconfig end_of_line rules guide what the editor writes. | ||
| # The exception pins below are git's own enforcement - they force LF for execution-sensitive classes regardless of editor. | ||
| # git config --global core.autocrlf false | ||
| # git add --renormalize . | ||
| # git ls-files --eol | ||
| * -text | ||
| # Exception: scripts must stay LF regardless of the `* -text` default - a CRLF shebang breaks execution. `.editorconfig` | ||
| # covers `*.sh`, but extensionless executables (s6 service scripts, hooks) match no extension rule, so pin them here so | ||
| # git enforces LF on checkout and `--renormalize`. A repo shipping extensionless scripts adds an explicit path rule, | ||
| # e.g. for s6-overlay init: `Docker/s6-overlay/** text eol=lf`. | ||
| *.sh text eol=lf | ||
| # Dockerfiles must be LF - a CRLF breaks RUN heredocs and line continuations. | ||
| Dockerfile text eol=lf | ||
| *.Dockerfile text eol=lf | ||
| # Extensionless executables must stay LF - a CRLF shebang breaks execution. The Husky.Net git hook matches no extension rule. | ||
| .husky/pre-commit text eol=lf | ||
| # LanguageData/ holds downloaded source data the parser reads byte-for-byte; never normalize it. The `* -text` default | ||
| # above preserves it exactly as downloaded - do NOT add a `text`/`eol=` rule here. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,12 +3,12 @@ name: Build project release task | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| # Input to control whether to create a GitHub release | ||
| # Whether to create a GitHub release. | ||
| github: | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| # Input to control whether to push the library to NuGet.org | ||
| # Whether to push the library to NuGet.org. | ||
| nuget: | ||
| required: false | ||
| type: boolean | ||
| @@ -35,6 +35,12 @@ on: | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| # Set false for a repo that produces no release-asset-* files (e.g. Docker-only): the release is then just the | ||
| # tag + source zip + README + LICENSE; the artifact download is skipped and the unmatched-files guard relaxes. | ||
| expect_release_assets: | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
| jobs: | ||
| @@ -76,7 +82,28 @@ jobs: | ||
| with: | ||
| ref: ${{ needs.get-version.outputs.GitCommitId }} | ||
| # Backstop (main only): a public release must not carry a prerelease '-', guarding against NBGV mis-versioning the | ||
| # public ref (e.g. a dispatch on a non-default ref) into a malformed "Latest" release. Strip '+buildmetadata' | ||
| # first - a '-' there is legitimate; only a '-' in the core/prerelease segment marks a prerelease. | ||
| - name: Verify public release version step | ||
| if: ${{ inputs.branch == 'main' }} | ||
| env: | ||
| SEMVER2: ${{ needs.get-version.outputs.SemVer2 }} | ||
| run: | | ||
| set -euo pipefail | ||
| CORE_AND_PRE="${SEMVER2%%+*}" # drop +buildmetadata; a '-' here is the genuine prerelease separator | ||
| if [[ "$CORE_AND_PRE" == *-* ]]; then | ||
| echo "::error::Public (main) release version '$SEMVER2' carries a prerelease suffix; refusing to publish." | ||
| exit 1 | ||
| fi | ||
| # Collect assets by the `release-asset-<branch>-*` pattern so this step is target-agnostic: subset releases by | ||
| # deleting the target, not `enable_*: false` (a skipped `needs` job would skip this release job too). The release | ||
| # step guards `fail_on_unmatched_files: true`, so at least one `release-asset-*` must match; a repo that drops | ||
| # every file-producing target (e.g. a Docker-only repo, whose release carries only source zip + README + LICENSE) | ||
| # relaxes that guard. | ||
| - name: Download release asset artifacts step | ||
| if: ${{ inputs.expect_release_assets }} | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| pattern: release-asset-${{ inputs.branch }}-* | ||
| @@ -106,6 +133,10 @@ jobs: | ||
| # `target_commitish` must be set explicitly: otherwise GitHub's REST API tags the release on the default branch. | ||
| # Pin it to `GitCommitId` so the tag is on the exact built commit, consistent with the SemVer2 tag and artifacts. | ||
| # Skip when the release already exists, but always let a manual `workflow_dispatch` through to refresh it. | ||
| # Every release (any branch, any target) is a tag on the built commit plus the auto-attached source zip, README, | ||
| # and LICENSE; targets amend it by uploading `release-asset-*` files (binaries/packages) or pushing elsewhere | ||
| # (image/registry). `fail_on_unmatched_files: true` fails loudly if a promised `release-asset-*` is missing or | ||
| # misnamed; a no-file-target repo relaxes it (see download step). | ||
| - name: Create GitHub release step | ||
| if: ${{ steps.release-exists.outputs.exists == 'false' || github.event_name == 'workflow_dispatch' }} | ||
| uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1 | ||
| @@ -114,6 +145,7 @@ jobs: | ||
| tag_name: ${{ needs.get-version.outputs.SemVer2 }} | ||
| target_commitish: ${{ needs.get-version.outputs.GitCommitId }} | ||
| prerelease: ${{ inputs.branch != 'main' }} | ||
| fail_on_unmatched_files: ${{ inputs.expect_release_assets }} | ||
ptr727 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| files: | | ||
| LICENSE | ||
| README.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.