Skip to content

Commit

Permalink
⬆️ Bump files with dotnet-file sync
Browse files Browse the repository at this point in the history
# devlooped/oss

- Switch back to latest stable includes devlooped/oss@875284b
- Improve triage actions on issues devlooped/oss@33000c0
- Upload binlog artifact on debug runs devlooped/oss@a67ae78
- Set env:gh_token if present as secret devlooped/oss@97ebd18
- Update to checkout@v4 devlooped/oss@5fb1723
- Bump create-pr dependency to avoid error with existing PRs devlooped/oss@11a8757
- Only commit markdown files when resolving includes devlooped/oss@2c10a83
- Cleanup build and publish to use VersionLabel devlooped/oss@14deaea
- Automatically use the new terminal logger if possible devlooped/oss@27a5c9a
- Allow choosing build configuration on dispatch devlooped/oss@fef4635
- Remove shared community files from ignores devlooped/oss@65f89e0
- Simplify testing by switching to dotnet-retest devlooped/oss@b5bb972
- We don't push just from ubuntu anymore devlooped/oss@7ec9101
- Allow seamless sleet upgrades without requiring workflow updates devlooped/oss@5e17ad6
- Update includes.yml to include top-level .md devlooped/oss@d152e74
- Upgrade to supported artifact actions devlooped/oss@64141f1
- Ensure .NET9 SDK for --allow-downgrade switch on ubuntu devlooped/oss@cdeecc2
- Make sure all stable versions are available for build/test devlooped/oss@06e898c
- Attempt to get necessary permissions for default token devlooped/oss@85829f2
- Only ignore App folder directly under the root devlooped/oss@02811fa
- Update .gitignore to ignore .genaiscript devlooped/oss@e0be248
- Skip discussion issues when generating changelog devlooped/oss@08d83cb
- Add trx logger by default to CLI builds devlooped/oss@a75b141
- Remove -l:trx since it's just for dotnet test, not build devlooped/oss@0f7f7f7
- Simplify .gitattributes devlooped/oss@5f92a68
- Add static usings to allow unprefixed ThrowXxxx devlooped/oss@6dfe21f
- Add compatibility for non-SDK projects without InitializeSourceControlInformation target devlooped/oss@6e96c59
- Set Version from VersionLabel if it's a refs/tags/ devlooped/oss@57653a2
- Improve default value for GenerateDocumentationFile devlooped/oss@b76de49
- Add common sponsors metadata to assemblies devlooped/oss@0789bf0
- Update assembly metadata format for Funding.GitHub devlooped/oss@5801de0
- Update dotnet-file.yml with fix to create pull request action devlooped/oss@11a331d
- SponsorLink metadata will be opt-in only by analyzer projects devlooped/oss@c618ea8
- Don't add random wait on manual dotnet-file runs devlooped/oss@7afe350
- If we provide a docs category, don't exclude docs :) devlooped/oss@0c23e24
- Fix typo in targets devlooped/oss@33a20db
- Don't copy default icon to output directory devlooped/oss@9263184
- Update typed resgen to opt-in only devlooped/oss@a8b2080
- Update dotnet-file.yml to latest pr action devlooped/oss@42704be
- Switch to reusable workflow for dotnet-file devlooped/oss@f2e52f7
- Rename sync to run devlooped/oss@9d58f5c
- Point to main for dotnet-file sync workflow devlooped/oss@59aaf43
  • Loading branch information
devlooped-bot committed Feb 8, 2025
1 parent f2dcabd commit 41770d1
Show file tree
Hide file tree
Showing 18 changed files with 356 additions and 242 deletions.
22 changes: 3 additions & 19 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
# sln, csproj files (and friends) are always CRLF, even on linux
*.sln text eol=crlf
*.proj text eol=crlf
*.csproj text eol=crlf
# normalize by default
* text=auto encoding=UTF-8
*.sh text eol=lf

# These are windows specific files which we may as well ensure are
# always crlf on checkout
*.bat text eol=crlf
*.cmd text eol=crlf

# Opt in known filetypes to always normalize line endings on checkin
# and always use native endings on checkout
*.c text
*.config text
*.h text
*.cs text
*.md text
*.tt text
*.txt text

# Some must always be checked out as lf so enforce that for those files
# If these are not lf then bash/cygwin on windows will not be able to
# excute the files
*.sh text eol=lf
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ changelog:
- invalid
- wontfix
- need info
- docs
- techdebt
authors:
- devlooped-bot
Expand All @@ -24,6 +23,7 @@ changelog:
- title: 📝 Documentation updates
labels:
- docs
- documentation
- title: 🔨 Other
labels:
- '*'
Expand Down
53 changes: 35 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,31 @@
name: build
on:
workflow_dispatch:
inputs:
configuration:
type: choice
description: Configuration
options:
- Release
- Debug
push:
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- code-of-conduct.md
- security.md
- support.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]

env:
DOTNET_NOLOGO: true
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
PackOnBuild: true
GeneratePackageOnBuild: true

VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
Configuration: ${{ github.event.inputs.configuration || 'Release' }}

defaults:
run:
shell: bash
Expand All @@ -33,7 +40,7 @@ jobs:
matrix: ${{ steps.lookup.outputs.matrix }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 🔎 lookup
id: lookup
Expand All @@ -52,37 +59,47 @@ jobs:
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
9.x
- name: 🙏 build
run: dotnet build -m:1
run: dotnet build -m:1 -bl:build.binlog

- name: ⚙ GNU grep
if: matrix.os == 'macOS-latest'
- name: 🧪 test
run: |
brew install grep
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build
- name: 🧪 test
uses: ./.github/workflows/test
- name: 🐛 logs
uses: actions/upload-artifact@v4
if: runner.debug && always()
with:
name: logs
path: '*.binlog'

# Only push CI package to sleet feed if building on ubuntu (fastest)
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool install -g --version 4.0.18 sleet
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
usernames-as-github-logins=true
issues_wo_labels=true
pr_wo_labels=true
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info,docs
exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs
enhancement-label=:sparkles: Implemented enhancements:
bugs-label=:bug: Fixed bugs:
issues-label=:hammer: Other:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/dotnet-file-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Synchronizes .netconfig-configured files with dotnet-file
name: dotnet-file-core
on:
workflow_call:

env:
DOTNET_NOLOGO: true

defaults:
run:
shell: pwsh

jobs:
sync:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: 🤖 defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤘 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
token: ${{ env.GH_TOKEN }}

- name: ⌛ rate
if: github.event_name != 'workflow_dispatch'
run: |
# add random sleep since we run on fixed schedule
sleep (get-random -max 60)
# get currently authenticated user rate limit info
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
# if we don't have at least 100 requests left, wait until reset
if ($rate.remaining -lt 10) {
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
sleep $wait
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
echo "Rate limit has reset to $($rate.remaining) requests"
}
- name: 🔄 sync
run: |
dotnet tool update -g dotnet-gcm
# store credentials in plaintext for linux compat
git config --local credential.credentialStore plaintext
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
gh auth status
dotnet tool update -g dotnet-file
$changelog = "$([System.IO.Path]::GetTempPath())dotnet-file.md"
dotnet file sync -c:$changelog
if (test-path $changelog) {
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
cat $changelog >> $env:GITHUB_ENV
echo 'EOF' >> $env:GITHUB_ENV
cat $changelog
} else {
echo 'No changelog was generated'
}
- name: +Mᐁ includes
uses: devlooped/actions-includes@v1
with:
validate: false

- name: ✍ pull request
uses: peter-evans/create-pull-request@v7
with:
base: main
branch: dotnet-file-sync
delete-branch: true
labels: dependencies
author: ${{ env.BOT_AUTHOR }}
committer: ${{ env.BOT_AUTHOR }}
commit-message: ⬆️ Bump files with dotnet-file sync

${{ env.CHANGES }}
title: "⬆️ Bump files with dotnet-file sync"
body: ${{ env.CHANGES }}
token: ${{ env.GH_TOKEN }}
76 changes: 3 additions & 73 deletions .github/workflows/dotnet-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,76 +11,6 @@ env:
DOTNET_NOLOGO: true

jobs:
sync:
runs-on: windows-latest
continue-on-error: true
steps:
- name: 🤖 defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
token: ${{ env.GH_TOKEN }}

- name: ⌛ rate
shell: pwsh
run: |
# add random sleep since we run on fixed schedule
sleep (get-random -max 60)
# get currently authenticated user rate limit info
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
# if we don't have at least 100 requests left, wait until reset
if ($rate.remaining -lt 10) {
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
sleep $wait
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
echo "Rate limit has reset to $($rate.remaining) requests"
}
- name: 🔄 sync
shell: pwsh
run: |
dotnet tool update -g dotnet-gcm
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
gh auth status
dotnet tool update -g dotnet-file
dotnet file sync -c:$env:TEMP\dotnet-file.md
if (test-path $env:TEMP\dotnet-file.md) {
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV
echo 'EOF' >> $env:GITHUB_ENV
cat $env:TEMP\dotnet-file.md
} else {
echo 'No changelog was generated'
}
- name: +Mᐁ includes
uses: devlooped/actions-include@v1
with:
validate: false

- name: ✍ pull request
uses: peter-evans/create-pull-request@v4
with:
base: main
branch: dotnet-file-sync
delete-branch: true
labels: dependencies
author: ${{ env.BOT_AUTHOR }}
committer: ${{ env.BOT_AUTHOR }}
commit-message: ⬆️ Bump files with dotnet-file sync

${{ env.CHANGES }}
title: "⬆️ Bump files with dotnet-file sync"
body: ${{ env.CHANGES }}
token: ${{ env.GH_TOKEN }}
run:
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
secrets: inherit
8 changes: 6 additions & 2 deletions .github/workflows/includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
includes:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: 🤖 defaults
uses: devlooped/actions-bot@v1
Expand All @@ -21,16 +24,17 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
token: ${{ env.GH_TOKEN }}

- name: +Mᐁ includes
uses: devlooped/actions-includes@v1

- name: ✍ pull request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
add-paths: '**.md'
base: main
branch: markdown-includes
delete-branch: true
Expand Down
Loading

0 comments on commit 41770d1

Please sign in to comment.