Skip to content
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

⬆️ Bump files with dotnet-file sync #351

Merged
merged 1 commit into from
Sep 10, 2024
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
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +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 Down Expand Up @@ -61,14 +67,10 @@ jobs:
- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog

- name: ⚙ GNU grep
if: matrix.os == 'macOS-latest'
run: |
brew install grep
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile

- name: 🧪 test
uses: ./.github/workflows/test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build

- name: 🐛 logs
uses: actions/upload-artifact@v3
Expand All @@ -77,7 +79,6 @@ jobs:
name: logs
path: '*.binlog'

# Only push CI package to sleet feed if building on ubuntu (fastest)
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
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/includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: ✍ pull request
uses: peter-evans/create-pull-request@v6
with:
add-paths: '**/*.md'
add-paths: '**.md'
base: main
branch: markdown-includes
delete-branch: true
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
name: publish
on:
release:
types: [released]
types: [prereleased, released]

env:
DOTNET_NOLOGO: true
Configuration: Release
PackOnBuild: true
GeneratePackageOnBuild: true
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}

MSBUILDTERMINALLOGGER: auto

jobs:
publish:
runs-on: ubuntu-latest
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
Expand All @@ -25,10 +27,12 @@ jobs:
fetch-depth: 0

- name: 🙏 build
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v} -bl:build.binlog
run: dotnet build -m:1 -bl:build.binlog

- name: 🧪 test
uses: ./.github/workflows/test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build

- name: 🐛 logs
uses: actions/upload-artifact@v3
Expand All @@ -38,4 +42,16 @@ jobs:
path: '*.binlog'

- name: 🚀 nuget
run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
working-directory: bin
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate

- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
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"
24 changes: 0 additions & 24 deletions .github/workflows/sponsor.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/test/action.yml

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: 'triage'
on:
schedule:
- cron: '42 0 * * *'

workflow_dispatch:
# Manual triggering through the GitHub UI, API, or CLI
inputs:
daysBeforeClose:
description: "Days before closing stale or need info issues"
required: true
default: "30"
daysBeforeStale:
description: "Days before labeling stale"
required: true
default: "180"
daysSinceClose:
description: "Days since close to lock"
required: true
default: "30"
daysSinceUpdate:
description: "Days since update to lock"
required: true
default: "30"

permissions:
actions: write # For managing the operation state cache
issues: write
contents: read

jobs:
stale:
# Do not run on forks
if: github.repository_owner == 'devlooped'
runs-on: ubuntu-latest
steps:
- name: ⌛ rate
shell: pwsh
if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ secrets.DEVLOOPED_TOKEN }}
run: |
# add random sleep since we run on fixed schedule
$wait = get-random -max 180
echo "Waiting random $wait seconds to start"
sleep $wait
# 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 100) {
$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: ✏️ stale labeler
# pending merge: https://github.com/actions/stale/pull/1176
uses: kzu/stale@c8450312ba97b204bf37545cb249742144d6ca69
with:
ascending: true # Process the oldest issues first
stale-issue-label: 'stale'
stale-issue-message: |
Due to lack of recent activity, this issue has been labeled as 'stale'.
It will be closed if no further activity occurs within ${{ fromJson(inputs.daysBeforeClose || 30 ) }} more days.
Any new comment will remove the label.
close-issue-message: |
This issue will now be closed since it has been labeled 'stale' without activity for ${{ fromJson(inputs.daysBeforeClose || 30 ) }} days.
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 180) }}
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }}
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
exempt-all-milestones: true
exempt-all-assignees: true
exempt-issue-labels: priority,sponsor,backed
exempt-authors: kzu

- name: 🤘 checkout actions
uses: actions/checkout@v4
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: v42

- name: ⚙ install actions
run: npm install --production

- name: 🔒 issues locker
uses: ./locker
with:
token: ${{ secrets.DEVLOOPED_TOKEN }}
ignoredLabel: priority
daysSinceClose: ${{ fromJson(inputs.daysSinceClose || 30) }}
daysSinceUpdate: ${{ fromJson(inputs.daysSinceUpdate || 30) }}

- name: 🔒 need info closer
uses: ./needs-more-info-closer
with:
token: ${{ secrets.DEVLOOPED_TOKEN }}
label: 'need info'
closeDays: ${{ fromJson(inputs.daysBeforeClose || 30) }}
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity.\n\nHappy Coding!"
pingDays: 80
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
Loading