1717 MSBUILDTERMINALLOGGER : auto
1818
1919jobs :
20- publish :
20+ build :
2121 runs-on : ubuntu-latest
2222 steps :
2323 - name : 🤘 checkout
@@ -60,17 +60,76 @@ jobs:
6060 name : logs
6161 path : ' *.binlog'
6262
63- - name : 🚀 nuget
64- env :
65- NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
66- if : ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
67- working-directory : bin
68- run : dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
63+ - name : ⬆️ upload
64+ if : success()
65+ uses : actions/upload-artifact@v4
66+ with :
67+ name : pkg
68+ path : bin/*
69+
70+ test :
71+ needs : build
72+ name : test-${{ matrix.os }}
73+ runs-on : ${{ matrix.os }}
74+ strategy :
75+ matrix :
76+ os : [ 'ubuntu-latest', 'windows-latest' ]
77+ steps :
78+ - name : 🤘 checkout
79+ uses : actions/checkout@v4
80+ with :
81+ submodules : recursive
82+ fetch-depth : 0
83+
84+ - name : ⬇️ artifacts
85+ uses : actions/download-artifact@v4
86+ with :
87+ name : pkg
88+ path : bin
89+
90+ - name : 🧪 test
91+ shell : pwsh
92+ run : |
93+ $fileName = gci -path ./bin -file | where { $_.name -like "chromium.*" } | select -first 1 -ExpandProperty name
94+ $version = $fileName -replace '^chromium\.' -replace '\.nupkg$'
95+ $source = join-path "${{ github.workspace }}" "bin"
96+ dotnet nuget add source $source
97+ dotnet tool install -g dotnet-chromium --version $version
98+ chromium --headless https://api.ipify.org
99+
100+ push :
101+ needs : test
102+ if : success()
103+ runs-on : ubuntu-latest
104+ steps :
105+ - name : ⬇️ artifacts
106+ uses : actions/download-artifact@v4
107+ with :
108+ name : pkg
109+ path : bin
69110
70111 - name : 🚀 sleet
71112 env :
72113 SLEET_CONNECTION : ${{ secrets.SLEET_CONNECTION }}
73114 if : env.SLEET_CONNECTION != ''
74115 run : |
75116 dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
76- 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"
117+ 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"
118+
119+ publish :
120+ needs : push
121+ if : success()
122+ runs-on : ubuntu-latest
123+ steps :
124+ - name : ⬇️ artifacts
125+ uses : actions/download-artifact@v4
126+ with :
127+ name : pkg
128+ path : bin
129+
130+ - name : 🚀 nuget
131+ env :
132+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
133+ if : ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
134+ working-directory : bin
135+ run : dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
0 commit comments