Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit a677422

Browse files
authored
Bump files with dotnet-file sync
# devlooped/oss - Don't collect logs anymore devlooped/oss@6bd81a3 - Don't run build when changing docs devlooped/oss@db76fb9 - 🔨 Populate RepositoryBranch in CI w/MSBuild devlooped/oss@55c0b32 - Don't fail the build if sleet finds no packages to push devlooped/oss@6928fc7 - Allow manually running builds devlooped/oss@fc5889d - Use full name as Author, since Owner is already kzu devlooped/oss@0fc6e0e - Only include/pack icon.png if it exists in the default location devlooped/oss@ae442c0 - Allow manually running changelog and dotnet-file workflows devlooped/oss@084aa7c - Automatically label dotnet-file bump and auto-delete branch devlooped/oss@eeaeb55
1 parent 9268786 commit a677422

File tree

8 files changed

+65
-119
lines changed

8 files changed

+65
-119
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33

44
name: build
55
on:
6+
workflow_dispatch:
67
push:
78
branches: [ main, dev, 'feature/*', 'rel/*' ]
9+
paths-ignore:
10+
- changelog.md
11+
- code-of-conduct.md
12+
- security.md
13+
- support.md
814
pull_request:
915
types: [opened, synchronize, reopened]
1016

@@ -46,20 +52,14 @@ jobs:
4652
fetch-depth: 0
4753

4854
- name: 🙏 build
49-
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
55+
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
5056

5157
- name: 🧪 test
52-
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/${{ matrix.os }}.txt -r $GITHUB_WORKSPACE/logs
58+
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m
5359

5460
- name: 📦 pack
55-
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}
61+
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
5662

57-
- name: 🔼 packages
58-
uses: actions/upload-artifact@v2
59-
with:
60-
name: bin
61-
path: bin/*.nupkg
62-
6363
# Only push CI package to sleet feed if building on ubuntu (fastest)
6464
- name: 🚀 sleet
6565
env:
@@ -68,80 +68,3 @@ jobs:
6868
run: |
6969
dotnet tool install -g --version 4.0.18 sleet
7070
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"
71-
72-
acceptance:
73-
name: acceptance-${{ matrix.os }}
74-
runs-on: ${{ matrix.os }}
75-
needs: build
76-
strategy:
77-
matrix:
78-
os: [ubuntu-latest, windows-latest, macOS-latest]
79-
steps:
80-
- name: 🤘 checkout
81-
uses: actions/checkout@v2
82-
83-
- name: 🔽 packages
84-
uses: actions/download-artifact@v2
85-
with:
86-
name: bin
87-
path: bin
88-
89-
- name: 🧪 test
90-
run: dotnet test -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
91-
working-directory: src/Acceptance
92-
93-
preview:
94-
defaults:
95-
run:
96-
shell: pwsh
97-
needs: dotnet-format
98-
runs-on: windows-latest
99-
100-
steps:
101-
- name: 🤘 checkout
102-
uses: actions/checkout@v2
103-
104-
# > VS Preview
105-
- name: 🔽 dotnet-vs
106-
run: dotnet tool update -g dotnet-vs
107-
- name: 🔽 vs preview
108-
run: vs install preview --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools
109-
- name: ≥ msbuild
110-
run: echo "$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" >> $env:GITHUB_PATH
111-
# < VS Preview
112-
113-
- name: ⚙ curl
114-
run: |
115-
iwr -useb get.scoop.sh | iex
116-
scoop install curl
117-
- name: 🔍 status for PR
118-
if: ${{ github.event.pull_request.head.sha }}
119-
run: echo "STATUS_SHA=${{ github.event.pull_request.head.sha }}" >> $env:GITHUB_ENV
120-
121-
- name: 🔍 status for branch
122-
if: ${{ !github.event.pull_request.head.sha }}
123-
run: echo "STATUS_SHA=$($env:GITHUB_SHA)" >> $env:GITHUB_ENV
124-
125-
- name: ⌛ wait on build
126-
env:
127-
CHECK: build-windows-latest
128-
SHA: ${{ env.STATUS_SHA }}
129-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
130-
run: ./.github/workflows/wait-status.ps1
131-
132-
- name: ⌛ wait on acceptance
133-
env:
134-
CHECK: acceptance-windows-latest
135-
SHA: ${{ env.STATUS_SHA }}
136-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
137-
run: ./.github/workflows/wait-status.ps1
138-
139-
- name: 🔽 packages
140-
uses: actions/download-artifact@v2
141-
with:
142-
name: bin
143-
path: bin
144-
145-
- name: 🧪 test
146-
run: msbuild -r -t:build,test -p:TargetFramework=net472 -p:VersionLabel="$($env:GITHUB_REF).$($env:GITHUB_RUN_NUMBER)"
147-
working-directory: src/Acceptance

.github/workflows/changelog.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
on:
33
release:
44
types: [released]
5+
workflow_dispatch:
56

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

.github/workflows/dotnet-file.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Synchronizes .netconfig-configured files with dotnet-file
22
name: dotnet-file
33
on:
4+
workflow_dispatch:
45
schedule:
56
- cron: "0 0 * * *"
67
push:
@@ -50,6 +51,8 @@ jobs:
5051
with:
5152
base: main
5253
branch: dotnet-file-sync
54+
delete-branch: true
55+
labels: dependencies
5356
commit-message: Bump files with dotnet-file sync
5457

5558
${{ env.CHANGES }}

.github/workflows/publish.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@ jobs:
2222
fetch-depth: 0
2323

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

2727
- name: 🧪 test
2828
run: dotnet test --no-build -m:1
2929

3030
- name: 📦 pack
31-
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
32-
33-
- name: 🔼 logs
34-
if: ${{ always() }}
35-
uses: actions/upload-artifact@v2
36-
with:
37-
path: '**/*.binlog'
31+
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
3832

3933
- name: 🚀 nuget
4034
run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate

.github/workflows/release-artifacts.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@ jobs:
2020
run: echo "CURRENT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2121

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

2525
- name: 🧪 test
2626
run: dotnet test --no-build -m:1
2727

2828
- name: 📦 pack
29-
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}
30-
31-
- name: 🔼 logs
32-
if: ${{ always() }}
33-
uses: actions/upload-artifact@v2
34-
with:
35-
path: '**/*.binlog'
29+
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
3630

3731
- name: 🔽 gh
3832
run: |

.netconfig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
[file ".github/workflows/build.yml"]
5454
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
55-
sha = 4bc9de2ce63f083c2805752a25c5997ebc102aeb
56-
etag = 16edbc0d7121c2527f0e62d441bbb4ac2b1ffc7e25ccd4b3d0611c0c86716520
55+
sha = fc5889d5387e2d5aa7aba279b2aa12251cf08cb2
56+
etag = 91e9a208cd134bd7b71d7419800c613bc50a30e21e605607528721f2acdeab86
5757
weak
5858

5959
[file ".github_changelog_generator"]
@@ -100,14 +100,14 @@
100100

101101
[file "src/Directory.Build.props"]
102102
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
103-
sha = c9924b558ddeafb2cb547a7fcbc18aa7ae292ad1
104-
etag = dc86d6818b98a7426c604039a07e134d61c8c598f1ceedb9e0e481fa0f93385d
103+
sha = ae442c0e142d8948b1d26136c057a73ece224581
104+
etag = d9d8096ce24bfa68e7bd23728e737c8440fc05eb1a56a190fd671946ad89c277
105105
weak
106106

107107
[file "src/Directory.Build.targets"]
108108
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
109-
sha = e7de4d0e790f9fe58f31308f95886884b6c5805f
110-
etag = 9956aef0f3becce22fc1dc4e68dd218d5ba3c23de2b106c4ad006ad321cacc4a
109+
sha = 55c0b32601e94e1eed35028a0cad510c6bcbb265
110+
etag = 874f20853c983e6440ed67bb571d94927f9fb4cd4438585b07df7b420c664609
111111
weak
112112

113113
[file "src/kzu.snk"]
@@ -166,20 +166,20 @@
166166

167167
[file ".github/workflows/changelog.yml"]
168168
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
169-
sha = 169dfb51e7fa3f05cbfe01ca0342c0729f69b481
170-
etag = 2478e00a02849f0a65287d44028eb3c9f99ee0c0529cddaa88088765abc5da0b
169+
sha = 084aa7c36ee1c262ea2f9e83931068366a7b4312
170+
etag = 1e17c477f9e26f83367870a18e3727a71dcbb49cd31d85e0cfcfe092202d3a66
171171
weak
172172

173173
[file ".github/workflows/publish.yml"]
174174
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
175-
sha = e68624389d8133571da53e83ab4e88de7bc028a8
176-
etag = 8067230717247263ad661c69780fdfdf4b6f140287517fee9c5d4e64d4b737af
175+
sha = 55c0b32601e94e1eed35028a0cad510c6bcbb265
176+
etag = ad8681ee3f191f796944135772b74565c470e349464e793aa664c888f7784b7a
177177
weak
178178

179179
[file ".github/workflows/release-artifacts.yml"]
180180
url = https://github.com/devlooped/oss/blob/main/.github/workflows/release-artifacts.yml
181-
sha = e68624389d8133571da53e83ab4e88de7bc028a8
182-
etag = 8be10a2fbeb9e6924d8b08e58a61a0f69138352c6f5477b53dcd34c26d8d35ef
181+
sha = 55c0b32601e94e1eed35028a0cad510c6bcbb265
182+
etag = 53f2dd2465fd15a065828468139544449ab7ccc0ba40f9074d7ac92426bfd07b
183183
weak
184184

185185
[file ".github/workflows/release-notes.yml"]
@@ -190,6 +190,6 @@
190190

191191
[file ".github/workflows/dotnet-file.yml"]
192192
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
193-
sha = 094043587f7e7313a0a77dece1532fbcb1ce8555
194-
etag = 15333d15756257ec2d7975ea3ba5a22d1e3fae98aab35d83d67a728628e90cea
193+
sha = 084aa7c36ee1c262ea2f9e83931068366a7b4312
194+
etag = 501f8bf58287fdd7467701342f7251a015bc29664b494e7d81a71c0c55bee61f
195195
weak

src/Directory.Build.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
</PropertyGroup>
2020

2121
<PropertyGroup Label="NuGet">
22-
<Authors>kzu</Authors>
22+
<Authors>Daniel Cazzulino</Authors>
2323
<Copyright>Copyright (C) Daniel Cazzulino and Contributors. All rights reserved.</Copyright>
2424
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2525
<PackageLicenseExpression>MIT</PackageLicenseExpression>
26-
<PackageIcon>icon.png</PackageIcon>
26+
<PackageIcon Condition="Exists('$(MSBuildThisFileDirectory)icon.png')">icon.png</PackageIcon>
2727

2828
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2929
<GenerateRepositoryUrlAttribute>true</GenerateRepositoryUrlAttribute>
@@ -41,7 +41,8 @@
4141
<None Include="$(MSBuildThisFileDirectory)icon.png" Link="icon.png"
4242
Pack="true"
4343
Visible="false"
44-
PackagePath="%(Filename)%(Extension)" />
44+
PackagePath="%(Filename)%(Extension)"
45+
Condition="Exists('$(MSBuildThisFileDirectory)icon.png')" />
4546
</ItemGroup>
4647

4748
<PropertyGroup Label="Build">

src/Directory.Build.targets

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,36 @@
3737
<OutDir>$(OutputPath)</OutDir>
3838
</PropertyGroup>
3939

40+
<PropertyGroup Condition="'$(RepositoryBranch)' == ''">
41+
<!-- GitHub Actions: https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables -->
42+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(GITHUB_REF)' != '' and $(GITHUB_REF.Contains('refs/pull/'))">pr$(GITHUB_REF.Replace('refs/pull/', '').Replace('/merge', ''))</RepositoryBranch>
43+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(GITHUB_REF)' != ''">$(GITHUB_REF.Replace('refs/heads/', '').Replace('refs/tags/', ''))</RepositoryBranch>
44+
<!-- Azure DevOps: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables -->
45+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUILD_SOURCEBRANCH)' != ''">$(BUILD_SOURCEBRANCH.Replace('refs/heads/', '').Replace('refs/tags/', ''))</RepositoryBranch>
46+
<!-- AppVeyor: https://www.appveyor.com/docs/environment-variables/ -->
47+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(APPVEYOR_PULL_REQUEST_NUMBER)' != ''">pr$(APPVEYOR_PULL_REQUEST_NUMBER)</RepositoryBranch>
48+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(APPVEYOR_REPO_TAG_NAME)' != ''">$(APPVEYOR_REPO_TAG_NAME)</RepositoryBranch>
49+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(APPVEYOR_REPO_BRANCH)' != ''">$(APPVEYOR_REPO_BRANCH)</RepositoryBranch>
50+
<!-- TeamCity: https://www.jetbrains.com/help/teamcity/predefined-build-parameters.html#Branch-Related+Parameters -->
51+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(TEAMCITY_BUILD_BRANCH)' != ''">$(TEAMCITY_BUILD_BRANCH)</RepositoryBranch>
52+
<!--TravisCI: https://docs.travis-ci.com/user/environment-variables/ -->
53+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(TRAVIS_PULL_REQUEST)' != '' and '$(TRAVIS_PULL_REQUEST)' != 'false'">pr$(TRAVIS_PULL_REQUEST)</RepositoryBranch>
54+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(TRAVIS_BRANCH)' != ''">$(TRAVIS_BRANCH)</RepositoryBranch>
55+
<!-- CircleCI: https://circleci.com/docs/2.0/env-vars/ -->
56+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CIRCLE_PR_NUMBER)' != ''">pr$(CIRCLE_PR_NUMBER)</RepositoryBranch>
57+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CIRCLE_TAG)' != ''">$(CIRCLE_TAG)</RepositoryBranch>
58+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CIRCLE_BRANCH)' != ''">$(CIRCLE_BRANCH)</RepositoryBranch>
59+
<!-- GitLab: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html -->
60+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CI_COMMIT_TAG)' != ''">$(CI_COMMIT_TAG)</RepositoryBranch>
61+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CI_MERGE_REQUEST_IID)' != ''">pr$(CI_MERGE_REQUEST_IID)</RepositoryBranch>
62+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CI_EXTERNAL_PULL_REQUEST_IID)' != ''">pr$(CI_EXTERNAL_PULL_REQUEST_IID)</RepositoryBranch>
63+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(CI_COMMIT_BRANCH)' != ''">$(CI_COMMIT_BRANCH)</RepositoryBranch>
64+
<!-- Buddy: https://buddy.works/docs/pipelines/environment-variables#default-environment-variables -->
65+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUDDY_EXECUTION_PULL_REQUEST_NO)' != ''">pr$(BUDDY_EXECUTION_PULL_REQUEST_NO)</RepositoryBranch>
66+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUDDY_EXECUTION_TAG)' != ''">$(BUDDY_EXECUTION_TAG)</RepositoryBranch>
67+
<RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUDDY_EXECUTION_BRANCH)' != ''">$(BUDDY_EXECUTION_BRANCH)</RepositoryBranch>
68+
</PropertyGroup>
69+
4070
<ItemGroup>
4171
<!-- Consider the project out of date if any of these files changes -->
4272
<UpToDateCheck Include="@(PackageFile);@(None);@(Content);@(EmbeddedResource)" />

0 commit comments

Comments
 (0)