Skip to content

Commit

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

- Move format check for last devlooped/oss@7db501b
- Make build matrix configurable per-repo devlooped/oss@391da5e
- Rename matrix lookup job and steps devlooped/oss@cf8e339
- Always pass in auth headers to GH API devlooped/oss@a922d03
- Use BOT_ defaults consistently devlooped/oss@98919f7
- Ensure checkout before defaults devlooped/oss@721ee85
- Rework to pass secrets explicitly devlooped/oss@15e9486
- Ensure both author and committer match devlooped/oss@d94ddb1
- Use a lighter down arrow, docs tag devlooped/oss@4bd76ee
- Bump to include action with fragment support devlooped/oss@c62cfb4
- Switch to new clean v1 devlooped/oss@e9b17b5
- Update to public bot defaults action devlooped/oss@b9671b9
- Add fallback GITHUB_TOKEN to bot defaults devlooped/oss@5406d90
- Use simple bash variable expansion devlooped/oss@acedd1d
- Don't resolve includes for changelog changes devlooped/oss@7985d4e
- Fix syntax for excluding one file devlooped/oss@5d05e54
- Use bot account for sync commit author devlooped/oss@1d3a2f4
- Resolve includes after file sync devlooped/oss@8f45cf2
- By default don't validate includes devlooped/oss@aed791a
- Ignore errors creating the PR devlooped/oss@b97b8f1

# devlooped/.github

- Simplify workflow, skip for bot accounts devlooped/.github@e347e5c

# devlooped/sponsors

- Refresh sponsors devlooped/sponsors@04f5dfb
  • Loading branch information
kzu committed Oct 15, 2022
1 parent 231b17e commit d8ec57c
Show file tree
Hide file tree
Showing 11 changed files with 134 additions and 221 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,29 @@ defaults:
shell: bash

jobs:
dotnet-format:
os-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.lookup.outputs.matrix }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: ✓ ensure format
run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget

- name: 🔎 lookup
id: lookup
shell: pwsh
run: |
$path = './.github/workflows/os-matrix.json'
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
echo "::set-output name=matrix::$os"
build:
needs: os-matrix
name: build-${{ matrix.os }}
needs: dotnet-format
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -83,3 +82,21 @@ jobs:
run: |
dotnet tool install -g --version 4.0.18 sleet
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
needs: build
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: ⚙ dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: ✓ ensure format
run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
27 changes: 12 additions & 15 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: changelog
on:
workflow_dispatch:
release:
types: [released]
workflow_dispatch:

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: 🔍 GH_TOKEN
if: env.GH_TOKEN == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV

- 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: ⚙ ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -32,11 +31,9 @@ jobs:
- name: ⚙ changelog
run: |
gem install github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/.github_changelog_generator
- name: 🚀 changelog
run: |
git config --local user.name github-actions
git config --local user.email github-actions@github.com
git add changelog.md
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
38 changes: 23 additions & 15 deletions .github/workflows/dotnet-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ on:

env:
DOTNET_NOLOGO: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}

jobs:
sync:
runs-on: windows-latest
steps:
- name: 🔍 GH_TOKEN
if: env.GH_TOKEN == ''
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
- 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
Expand All @@ -38,13 +45,6 @@ jobs:
echo "Rate limit has reset to $($rate.remaining) requests"
}
- name: 🤘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
token: ${{ env.GH_TOKEN }}

- name: 🔄 sync
shell: pwsh
run: |
Expand All @@ -63,16 +63,24 @@ jobs:
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@v3
continue-on-error: true
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"
title: "⬆️ Bump files with dotnet-file sync"
body: ${{ env.CHANGES }}
token: ${{ env.GH_TOKEN }}
27 changes: 21 additions & 6 deletions .github/workflows/includes.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
name: +M▼ includes
name: +Mᐁ includes
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- '**.md'
- '!changelog.md'

jobs:
includes:
runs-on: ubuntu-latest
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:
token: ${{ env.GH_TOKEN }}

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

- name: ✍ pull request
uses: peter-evans/create-pull-request@v3
with:
base: main
branch: markdown-includes
delete-branch: true
commit-message: +M▼ includes
title: +M▼ includes
body: +M▼ includes
labels: docs
author: ${{ env.BOT_AUTHOR }}
committer: ${{ env.BOT_AUTHOR }}
commit-message: +Mᐁ includes
title: +Mᐁ includes
body: +Mᐁ includes
token: ${{ env.GH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$id = iwr "$env:GITHUB_API_URL/repos/$env:GITHUB_REPOSITORY/releases/tags/$env:CURRENT_TAG" |
$headers = @{ 'Accept'='application/vnd.github.v3+json;charset=utf-8'; 'Authorization' = "bearer $env:GITHUB_TOKEN" }
$id = iwr "$env:GITHUB_API_URL/repos/$env:GITHUB_REPOSITORY/releases/tags/$env:CURRENT_TAG" -Headers $headers |
select -ExpandProperty Content |
ConvertFrom-Json |
select -ExpandProperty id
$notes = (Get-Content .\changelog.md | where { !($_ -like '\*') } | %{ $_.replace('\', '\\').replace('"', "'").replace('undefined', 'un-defined') }) -join '\n'
$headers = @{ 'Accept'='application/vnd.github.v3+json;charset=utf-8'; 'Authorization' = "bearer $env:GITHUB_TOKEN" }
$body = '{ "body":"' + $notes + '" }'
# ensure we can convert to json
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/sponsor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: sponsor ❤️
on:
issues:
types: [opened, edited, reopened]
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
sponsor:
runs-on: ubuntu-latest
if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2

- name: ❤️ sponsor
uses: devlooped/actions-sponsor@main
with:
token: ${{ secrets.GH_TOKEN }}
59 changes: 0 additions & 59 deletions .github/workflows/sponsors.ps1

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/sponsors.yml

This file was deleted.

Loading

0 comments on commit d8ec57c

Please sign in to comment.