Bump the azure group with 5 updates #1859
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, dev/* ] | |
| paths: | |
| - 'samples/**' | |
| - 'src/**' | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| env: | |
| DOTNET_NOLOGO: true | |
| Configuration: Release | |
| PackOnBuild: true | |
| VersionPrefix: 42.42.${{ github.run_number }} | |
| VersionLabel: ${{ github.ref }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🤘 checkout | |
| uses: actions/checkout@v4 | |
| - name: ⚙ dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.x | |
| 8.x | |
| 9.x | |
| - name: 🙏 build | |
| run: dotnet build -m:1 -bl | |
| - name: 🐛 logs | |
| uses: actions/upload-artifact@v4 | |
| if: runner.debug && always() | |
| with: | |
| name: logs | |
| path: '*.binlog' | |
| - name: ⚙ azurite | |
| run: | | |
| npm install azurite | |
| npx azurite & | |
| - name: 🧪 test | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} | |
| run: dotnet test | |
| - name: 🚀 sleet | |
| env: | |
| SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} | |
| if: env.SLEET_CONNECTION != '' | |
| run: | | |
| dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r) | |
| 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" | |
| - name: ⬆️ upload | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin/* | |
| deploy: | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: windows-latest | |
| steps: | |
| - name: 🤘 checkout | |
| uses: actions/checkout@v4 | |
| # Azure App registration with federeted credentials and Storage Blob Data Contributor role in target AZURE_BLOB_URL | |
| # See https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-create-trust-user-assigned-managed-identity?pivots=identity-wif-mi-methods-azp#github-actions-deploying-azure-resources | |
| - name: 🔓 azure login | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: ⚙ func 4.x | |
| run: npm i -g azure-functions-core-tools@4 --unsafe-perm true | |
| - name: 🚀 deploy | |
| working-directory: src\Web | |
| run: func azure functionapp publish sl-beta --dotnet-isolated | |
| test: | |
| name: test-${{ matrix.os }} | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: pwsh | |
| env: | |
| GCM_CREDENTIAL_STORE: cache | |
| strategy: | |
| matrix: | |
| os: [ 'windows-latest', 'ubuntu-latest', 'macOS-latest' ] | |
| steps: | |
| - name: ⬇️ artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pkg | |
| path: bin | |
| - name: ⚙ install | |
| working-directory: bin | |
| run: dotnet tool update -g dotnet-sponsor --prerelease --add-source . | |
| - name: 💻 setup | |
| run: | | |
| sponsor --version | |
| pushd ~ | |
| git config -f .sponsorlink/.netconfig sponsorlink.id devlooped.sponsors.ci | |
| - name: 🧪 run | |
| run: | | |
| '${{ secrets.DEVLOOPED_TOKEN }}' | sponsor sync devlooped --tos --with-token | |
| $team = cat ~/.sponsorlink/github/devlooped.jwt | jq -R 'split(".") | .[1] | @base64d | fromjson | .roles[] | select(. == "team")' -r | |
| if ($team -ne "team") { exit -1 } |