Skip to content

Commit

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

- We don't push just from ubuntu anymore devlooped/oss@7ec9101
- Simplify testing by switching to dotnet-retest devlooped/oss@b5bb972
  • Loading branch information
kzu committed Sep 3, 2024
1 parent a8546a2 commit 22ac23c
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 26 deletions.
55 changes: 44 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,81 @@
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
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

jobs:
os-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.lookup.outputs.matrix }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v4

- name: 🔎 lookup
id: lookup
shell: pwsh
run: |
$path = './.github/workflows/os-matrix.json'
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
echo "matrix=$os" >> $env:GITHUB_OUTPUT
build:
runs-on: windows-latest
needs: os-matrix
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
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: 🙏 build
run: dotnet build -m:1
run: dotnet build -m:1 -bl:build.binlog

- name: 🧪 test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build
- name: 📦 pack
run: dotnet pack -m:1
- name: 🐛 logs
uses: actions/upload-artifact@v3
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 }}
Expand All @@ -55,10 +88,10 @@ jobs:
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: windows-latest
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
Expand Down
44 changes: 31 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,52 @@
name: publish
on:
release:
types: [released]
types: [prereleased, released]

env:
DOTNET_NOLOGO: true
Configuration: Release

defaults:
run:
shell: bash

PackOnBuild: true
GeneratePackageOnBuild: true
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto

jobs:
publish:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: 🙏 build
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
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: 📦 pack
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
- name: 🐛 logs
uses: actions/upload-artifact@v3
if: runner.debug && always()
with:
name: logs
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 != ''
run: dotnet nuget push ./bin/**/*.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"
8 changes: 6 additions & 2 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
weak
[file ".github/workflows/build.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
skip
sha = 7ec91019eddb4fc7e0b09118538b256087f82e18
etag = 35b2a5b03c26cbe7522e30b2b987e04991e8ba18accd38b7ebd88191f1698c2d
weak
[file ".github/workflows/changelog.config"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config
sha = 08d83cb510732f861416760d37702f9f55bd7f9e
Expand All @@ -61,7 +63,9 @@
weak
[file ".github/workflows/publish.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
skip
sha = b5bb972199aa6ff220dda196588b23c21bb2780f
etag = 5a85d51e8c6cc6fbda43e12b3712a1e908a8e99b0908c4033ac9f4c66e5f233e
weak
[file ".gitignore"]
url = https://github.com/devlooped/oss/blob/main/.gitignore
sha = 02811fa23b0a102b9b33048335d41e515bf75737
Expand Down

0 comments on commit 22ac23c

Please sign in to comment.