From a39789e053f54ffc7f81ec683297b48d20c14a80 Mon Sep 17 00:00:00 2001 From: Damian Hickey <57436+damianh@users.noreply.github.com> Date: Sat, 5 Oct 2024 12:07:43 +0200 Subject: [PATCH] Refactor asscess-token-management workfow - Update name - Don't need to build on multiple platforms - Trigger filtered on path spec - Remove setup dotnet 6.0.x, dont need it --- .../workflows/access-token-management-ci.yml | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/.github/workflows/access-token-management-ci.yml b/.github/workflows/access-token-management-ci.yml index 1ac0a82e..d9c78219 100644 --- a/.github/workflows/access-token-management-ci.yml +++ b/.github/workflows/access-token-management-ci.yml @@ -1,55 +1,39 @@ -name: "CI" +name: access-token-management-ci + +permissions: + contents: read on: + workflow_dispatch: push: branches: - main - - features/** tags: - - '*.*.*' + - access-token-management-v* + paths: + - .github/workflows/access-token-management-ci.yml + - access-token-management/* pull_request: + paths: + - .github/workflows/access-token-management-ci.yml + - access-token-management/* env: DOTNET_NOLOGO: true -permissions: - contents: read - jobs: build: - strategy: - fail-fast: false - matrix: - runs-on: [macOS-latest, ubuntu-latest, windows-latest] - name: ${{ matrix.runs-on }} - runs-on: ${{ matrix.runs-on }} + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 6.0.x - - name: Setup dotnet - uses: actions/setup-dotnet@v1 + + - uses: actions/setup-dotnet@v4 with: dotnet-version: | 8.0.x - - - run: dotnet --info - - - if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu') - run: ./build.sh - - if: matrix.runs-on == 'windows-latest' && github.ref != 'refs/heads/main' && !contains(github.ref, 'refs/tags/') - run: ./build.ps1 - - if: (matrix.runs-on == 'windows-latest') && (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/')) - env: - SignClientSecret: ${{ secrets.SIGNCLIENTSECRET }} - run: | - ./build.ps1 sign - dotnet nuget push .\artifacts\*.nupkg -s https://www.myget.org/F/duende_identityserver/api/v2/package -k ${{ secrets.MYGET }} - \ No newline at end of file + + - name: Build and test + run: ./build.ps1 \ No newline at end of file