diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a109549..6653044 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,14 @@ jobs: 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 -bl:build.binlog @@ -73,7 +81,7 @@ jobs: dotnet retest -- --no-build - name: 🐛 logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: runner.debug && always() with: name: logs diff --git a/.github/workflows/combine-prs.yml b/.github/workflows/combine-prs.yml deleted file mode 100644 index 0255974..0000000 --- a/.github/workflows/combine-prs.yml +++ /dev/null @@ -1,157 +0,0 @@ -# Source: https://github.com/hrvey/combine-prs-workflow -# Tweaks: regex support for branch - -name: '⛙ combine-prs' - -on: - workflow_dispatch: - inputs: - branchExpression: - description: 'Regular expression to match against PR branches to find combinable PRs' - required: true - default: 'dependabot' - mustBeGreen: - description: 'Only combine PRs that are green (status is success)' - required: true - default: true - combineTitle: - description: 'Title of the combined PR' - required: true - default: '⬆️ Bump dependencies' - combineBranchName: - description: 'Name of the branch to combine PRs into' - required: true - default: 'combine-prs' - ignoreLabel: - description: 'Exclude PRs with this label' - required: true - default: 'nocombine' - -jobs: - combine-prs: - name: ${{ github.event.inputs.combineBranchName }} - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const pulls = await github.paginate('GET /repos/:owner/:repo/pulls', { - owner: context.repo.owner, - repo: context.repo.repo - }); - const branchRegExp = new RegExp(`${{github.event.inputs.branchExpression}}`); - let branchesAndPRStrings = []; - let baseBranch = null; - let baseBranchSHA = null; - for (const pull of pulls) { - const branch = pull['head']['ref']; - console.log('Pull for branch: ' + branch); - if (branchRegExp.test(branch)) { - console.log('Branch matched: ' + branch); - let statusOK = true; - if(${{ github.event.inputs.mustBeGreen }}) { - console.log('Checking green status: ' + branch); - const stateQuery = `query($owner: String!, $repo: String!, $pull_number: Int!) { - repository(owner: $owner, name: $repo) { - pullRequest(number:$pull_number) { - commits(last: 1) { - nodes { - commit { - statusCheckRollup { - state - } - } - } - } - } - } - }` - const vars = { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: pull['number'] - }; - const result = await github.graphql(stateQuery, vars); - const [{ commit }] = result.repository.pullRequest.commits.nodes; - const state = commit.statusCheckRollup.state - console.log('Validating status: ' + state); - if(state != 'SUCCESS') { - console.log('Discarding ' + branch + ' with status ' + state); - statusOK = false; - } - } - console.log('Checking labels: ' + branch); - const labels = pull['labels']; - for(const label of labels) { - const labelName = label['name']; - console.log('Checking label: ' + labelName); - if(labelName == '${{ github.event.inputs.ignoreLabel }}') { - console.log('Discarding ' + branch + ' with label ' + labelName); - statusOK = false; - } - } - if (statusOK) { - console.log('Adding branch to array: ' + branch); - const prString = '#' + pull['number'] + ' ' + pull['title']; - branchesAndPRStrings.push({ branch, prString }); - baseBranch = pull['base']['ref']; - baseBranchSHA = pull['base']['sha']; - } - } - } - if (branchesAndPRStrings.length == 0) { - core.setFailed('No PRs/branches matched criteria'); - return; - } - if (branchesAndPRStrings.length == 1) { - core.setFailed('Only one PR/branch matched criteria'); - return; - } - - try { - await github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: 'refs/heads/' + '${{ github.event.inputs.combineBranchName }}', - sha: baseBranchSHA - }); - } catch (error) { - console.log(error); - core.setFailed('Failed to create combined branch - maybe a branch by that name already exists?'); - return; - } - - let combinedPRs = []; - let mergeFailedPRs = []; - for(const { branch, prString } of branchesAndPRStrings) { - try { - await github.rest.repos.merge({ - owner: context.repo.owner, - repo: context.repo.repo, - base: '${{ github.event.inputs.combineBranchName }}', - head: branch, - }); - console.log('Merged branch ' + branch); - combinedPRs.push(prString); - } catch (error) { - console.log('Failed to merge branch ' + branch); - mergeFailedPRs.push(prString); - } - } - - console.log('Creating combined PR'); - const combinedPRsString = combinedPRs.join('\n'); - let body = '⛙ Combined PRs:\n' + combinedPRsString; - if(mergeFailedPRs.length > 0) { - const mergeFailedPRsString = mergeFailedPRs.join('\n'); - body += '\n\n⚠️ The following PRs were left out due to merge conflicts:\n' + mergeFailedPRsString - } - await github.rest.pulls.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: '⛙ ${{github.event.inputs.combineTitle}}', - head: '${{ github.event.inputs.combineBranchName }}', - base: baseBranch, - body: body - }); diff --git a/.github/workflows/includes.yml b/.github/workflows/includes.yml index 15a781e..d787ccb 100644 --- a/.github/workflows/includes.yml +++ b/.github/workflows/includes.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae4240f..8b065d7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,6 +26,14 @@ jobs: 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 -bl:build.binlog @@ -35,7 +43,7 @@ jobs: dotnet retest -- --no-build - name: 🐛 logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: runner.debug && always() with: name: logs diff --git a/.netconfig b/.netconfig index 6713968..d47e2b9 100644 --- a/.netconfig +++ b/.netconfig @@ -34,8 +34,8 @@ weak [file ".github/workflows/dotnet-file.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml - sha = 7afe350f7e80a230e922db026d4e1198ba15cae1 - etag = 65e9794df6caff779eb989c8f71ddf4d4109b24a75af79e4f8d0fe6ba7bd9702 + sha = 59aaf432369b5ea597831d4feec5a6ac4024c2e3 + etag = 1374e3f8c9b7af69c443605c03f7262300dcb7d783738d9eb9fe84268ed2d10c weak [file "license.txt"] url = https://github.com/devlooped/oss/blob/main/license.txt @@ -78,8 +78,8 @@ [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml weak - sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2 - etag = f358acb1e45596bf0aad49996017da44939de30b805289c4ad205a7ccb6f99cb + sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a + etag = 0a4b3f0a875cd8c9434742b4046558aecf610d3fa3d490cfd2099266e95e9195 [file ".github/workflows/changelog.config"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config sha = 08d83cb510732f861416760d37702f9f55bd7f9e @@ -87,19 +87,17 @@ weak [file ".github/workflows/combine-prs.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/combine-prs.yml - sha = c1610886eba42cb250e3894aed40c0a258cd383d - etag = 598ee294649a44d4c5d5934416c01183597d08aa7db7938453fd2bbf52a4e64d - weak + skip [file ".github/workflows/includes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml - sha = d152e7437fd0d6f6d9363d23cb3b78c07335ea49 - etag = ec40db34f379d0c6d83b2ec15624f330318a172cc4f85b5417c63e86eaf601df + sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de + etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee weak [file ".github/workflows/publish.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml weak - sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2 - etag = 2cc96046d8f28e7cbcde89ed56d3d89e1a70fb0de7846ee1827bee66b7dfbcf1 + sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a + etag = 2f64f75ad01f735fd05290370fb8a826111ac8dd7e74ce04226bb627a54a62ba [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore sha = e0be248fff1d39133345283b8227372b36574b75 @@ -130,3 +128,6 @@ sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a weak +[file ".github/workflows/dotnet-file-core.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml + skip diff --git a/readme.md b/readme.md index 7094873..91d8f86 100644 --- a/readme.md +++ b/readme.md @@ -433,7 +433,6 @@ The versioning scheme for packages is: [![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius) -[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov) [![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc) [![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh) [![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet) @@ -453,7 +452,6 @@ The versioning scheme for packages is: [![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai) [![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob Tikjøb Andersen")](https://github.com/jakobt) [![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager) -[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh) [![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny) [![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp) [![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu) @@ -463,6 +461,8 @@ The versioning scheme for packages is: [![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream) [![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC) [![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo) +[![Jordan S. Jones](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jordansjones.png "Jordan S. Jones")](https://github.com/jordansjones) +[![domischell](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/DominicSchell.png "domischell")](https://github.com/DominicSchell)