From 41e755a4aea13ff1d52b55079d5b5c5051ae460f Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Tue, 28 Oct 2025 10:22:25 +1300 Subject: [PATCH 1/9] [PETOSS-829] added action to publish OAUTH2Client nuget package --- .github/workflows/dotnet.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 26dc1927..f7c67079 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -57,6 +57,10 @@ jobs: run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Release/Xero.NetStandard.OAuth2.${{steps.get_latest_release_number.outputs.release_tag}}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json working-directory: Xero-NetStandard + - name: Publish OAuth2Client Package to Nuget.org + run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json + working-directory: Xero-NetStandard + notify-codegen-repo: needs: build From 5c97419207f34587fe9d0ae4fa2f6d127b9a5c61 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Tue, 28 Oct 2025 11:17:50 +1300 Subject: [PATCH 2/9] [PETOSS-829] moved action to publish OAUTH2Client nuget package to its own workflow --- .github/workflows/dotnet.yml | 5 - .../publish-Oauth2Client-package.yml | 97 +++++++++++++++++++ 2 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/publish-Oauth2Client-package.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f7c67079..23a48d77 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -57,11 +57,6 @@ jobs: run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Release/Xero.NetStandard.OAuth2.${{steps.get_latest_release_number.outputs.release_tag}}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json working-directory: Xero-NetStandard - - name: Publish OAuth2Client Package to Nuget.org - run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json - working-directory: Xero-NetStandard - - notify-codegen-repo: needs: build if: always() diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml new file mode 100644 index 00000000..1ac04e72 --- /dev/null +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -0,0 +1,97 @@ +name: Publish OAuth2Client Package +on: + workflow_dispatch: + inputs: + cab_id: + description: "CAB id for the change/release" + required: true + type: string + +jobs: + build: + + runs-on: ubuntu-latest + environment: prod + + permissions: + contents: write + pull-requests: write + + steps: + + - name: checkout dotnet repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-NetStandard + path: Xero-NetStandard + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore + working-directory: Xero-NetStandard + + - name: Build + run: dotnet build --no-restore + working-directory: Xero-NetStandard + + - name: Create OAuth2Client Package for Nuget.org + run: dotnet pack ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj + working-directory: Xero-NetStandard + + - name: Publish OAuth2Client Package to Nuget.org + run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json + working-directory: Xero-NetStandard + + notify-slack-on-success: + runs-on: ubuntu-latest + needs: build + if: success() + permissions: + contents: read + steps: + - name: Checkout Xero-NetStandard repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-NetStandard + path: Xero-NetStandard + + - name: Send slack notification on success + uses: ./Xero-NetStandard/.github/actions/notify-slack + with: + heading_text: "OAuth2Client Package publish job has succeeded !" + alert_type: "thumbsup" + job_status: "Success" + XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} + job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + button_type: "primary" + package_version: "OAuth2Client" + repo_link: ${{github.server_url}}/${{github.repository}} + + notify-slack-on-failure: + runs-on: ubuntu-latest + needs: build + if: failure() + permissions: + contents: read + steps: + - name: Checkout Xero-NetStandard repo + uses: actions/checkout@v4 + with: + repository: XeroAPI/Xero-NetStandard + path: Xero-NetStandard + + - name: Send slack notification on failure + uses: ./Xero-NetStandard/.github/actions/notify-slack + with: + heading_text: "OAuth2Client Package publish job has failed !" + alert_type: "alert" + job_status: "Failed" + XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} + job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + button_type: "danger" + package_version: "OAuth2Client" + repo_link: ${{github.server_url}}/${{github.repository}} From 0dce143a6ba86174eb234cabc2124de363f264d6 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Tue, 28 Oct 2025 13:53:06 +1300 Subject: [PATCH 3/9] [PETOSS-829] updated Oauth2Client to have a seperate version tag so it can be published seperately --- .../publish-Oauth2Client-package.yml | 85 +++++++++++++++++-- 1 file changed, 78 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index 1ac04e72..fb5756e1 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -6,13 +6,20 @@ on: description: "CAB id for the change/release" required: true type: string + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' # Triggers on main SDK version tags jobs: - build: + check-and-publish: runs-on: ubuntu-latest environment: prod + outputs: + client_version: ${{steps.calc_version.outputs.version}} + should_publish: ${{steps.calc_version.outputs.should_publish}} + permissions: contents: write pull-requests: write @@ -24,32 +31,96 @@ jobs: with: repository: XeroAPI/Xero-NetStandard path: Xero-NetStandard + fetch-depth: 0 # Fetch all history for git diff + + - name: Calculate OAuth2Client version + id: calc_version + run: | + # Get last client tag + LAST_CLIENT_TAG=$(git tag -l 'client-*' --sort=-v:refname | head -n 1) + + if [ -z "$LAST_CLIENT_TAG" ]; then + # No previous client tag, start with version from csproj + CURRENT_VERSION=$(grep '' ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj | sed 's/.*\(.*\)<\/Version>.*/\1/') + echo "No previous client tag found, using csproj version: $CURRENT_VERSION" + echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT + echo "should_publish=true" >> $GITHUB_OUTPUT + exit 0 + fi + + LAST_VERSION=${LAST_CLIENT_TAG#client-} + echo "Last OAuth2Client version: $LAST_VERSION (tag: $LAST_CLIENT_TAG)" + + # Check if OAuth2Client files changed since last client tag + if git diff --name-only $LAST_CLIENT_TAG HEAD | grep -q 'Xero.NetStandard.OAuth2Client/'; then + echo "OAuth2Client files have changed since $LAST_CLIENT_TAG" + + # Increment patch version + IFS='.' read -r major minor patch <<< "$LAST_VERSION" + NEW_VERSION="${major}.${minor}.$((patch + 1))" + + echo "Incrementing version: $LAST_VERSION -> $NEW_VERSION" + echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT + echo "should_publish=true" >> $GITHUB_OUTPUT + else + echo "No changes to OAuth2Client since $LAST_CLIENT_TAG" + echo "version=$LAST_VERSION" >> $GITHUB_OUTPUT + echo "should_publish=false" >> $GITHUB_OUTPUT + fi + working-directory: Xero-NetStandard + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Update csproj version + if: steps.calc_version.outputs.should_publish == 'true' + run: | + NEW_VERSION="${{steps.calc_version.outputs.version}}" + sed -i "s/.*<\/Version>/$NEW_VERSION<\/Version>/" \ + ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj + echo "Updated csproj to version $NEW_VERSION" + working-directory: Xero-NetStandard - name: Setup .NET + if: steps.calc_version.outputs.should_publish == 'true' uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Restore dependencies + if: steps.calc_version.outputs.should_publish == 'true' run: dotnet restore working-directory: Xero-NetStandard - name: Build + if: steps.calc_version.outputs.should_publish == 'true' run: dotnet build --no-restore working-directory: Xero-NetStandard - name: Create OAuth2Client Package for Nuget.org + if: steps.calc_version.outputs.should_publish == 'true' run: dotnet pack ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj working-directory: Xero-NetStandard - name: Publish OAuth2Client Package to Nuget.org - run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json + if: steps.calc_version.outputs.should_publish == 'true' + run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.${{steps.calc_version.outputs.version}}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json + working-directory: Xero-NetStandard + + - name: Create client tag + if: steps.calc_version.outputs.should_publish == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag "client-${{steps.calc_version.outputs.version}}" + git push origin "client-${{steps.calc_version.outputs.version}}" working-directory: Xero-NetStandard + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} notify-slack-on-success: runs-on: ubuntu-latest - needs: build - if: success() + needs: check-and-publish + if: success() && needs.check-and-publish.outputs.should_publish == 'true' permissions: contents: read steps: @@ -68,12 +139,12 @@ jobs: XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" button_type: "primary" - package_version: "OAuth2Client" + package_version: ${{needs.check-and-publish.outputs.client_version}} repo_link: ${{github.server_url}}/${{github.repository}} notify-slack-on-failure: runs-on: ubuntu-latest - needs: build + needs: check-and-publish if: failure() permissions: contents: read @@ -93,5 +164,5 @@ jobs: XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" button_type: "danger" - package_version: "OAuth2Client" + package_version: ${{needs.check-and-publish.outputs.client_version}} repo_link: ${{github.server_url}}/${{github.repository}} From 1844cd8f4cd8230741633ef311ab4b38dc2f2d20 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 11:56:49 +1300 Subject: [PATCH 4/9] [PETOSS-829] updated version to match bump of main sdk so a bump of 0.0.1 in the main will do the same to this package --- .../publish-Oauth2Client-package.yml | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index fb5756e1..be26575f 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -8,7 +8,7 @@ on: type: string push: tags: - - '[0-9]+.[0-9]+.[0-9]+' # Triggers on main SDK version tags + - '[0-9]+.[0-9]+.[0-9]+' # Triggers on main SDK version tags to check if Client SDK needs update jobs: check-and-publish: @@ -17,6 +17,7 @@ jobs: environment: prod outputs: + # Used to conditionally run publish steps and notifications client_version: ${{steps.calc_version.outputs.version}} should_publish: ${{steps.calc_version.outputs.should_publish}} @@ -51,15 +52,42 @@ jobs: LAST_VERSION=${LAST_CLIENT_TAG#client-} echo "Last OAuth2Client version: $LAST_VERSION (tag: $LAST_CLIENT_TAG)" + # Determine Bump Type from Main SDK tags + BUMP_TYPE="patch" + if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then + CURRENT_MAIN_TAG=$GITHUB_REF_NAME + # Find previous main tag (exclude current) + PREV_MAIN_TAG=$(git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | grep -v "^$CURRENT_MAIN_TAG$" | head -n 1) + + if [ ! -z "$PREV_MAIN_TAG" ]; then + echo "Main SDK Bump: $PREV_MAIN_TAG -> $CURRENT_MAIN_TAG" + IFS='.' read -r m1 m2 m3 <<< "$CURRENT_MAIN_TAG" + IFS='.' read -r p1 p2 p3 <<< "$PREV_MAIN_TAG" + + if [ "$m1" != "$p1" ]; then + BUMP_TYPE="major" + elif [ "$m2" != "$p2" ]; then + BUMP_TYPE="minor" + fi + fi + fi + echo "Detected bump type: $BUMP_TYPE" + # Check if OAuth2Client files changed since last client tag if git diff --name-only $LAST_CLIENT_TAG HEAD | grep -q 'Xero.NetStandard.OAuth2Client/'; then echo "OAuth2Client files have changed since $LAST_CLIENT_TAG" - # Increment patch version - IFS='.' read -r major minor patch <<< "$LAST_VERSION" - NEW_VERSION="${major}.${minor}.$((patch + 1))" + # Increment version based on bump type + IFS='.' read -r c1 c2 c3 <<< "$LAST_VERSION" + if [ "$BUMP_TYPE" == "major" ]; then + NEW_VERSION="$((c1 + 1)).0.0" + elif [ "$BUMP_TYPE" == "minor" ]; then + NEW_VERSION="${c1}.$((c2 + 1)).0" + else + NEW_VERSION="${c1}.${c2}.$((c3 + 1))" + fi - echo "Incrementing version: $LAST_VERSION -> $NEW_VERSION" + echo "Incrementing version ($BUMP_TYPE): $LAST_VERSION -> $NEW_VERSION" echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT echo "should_publish=true" >> $GITHUB_OUTPUT else From 6e8564a0f0b90a6559d41d449638268e9ba0647f Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 12:04:36 +1300 Subject: [PATCH 5/9] [PETOSS-829] removed should publish output as not needed --- .github/workflows/publish-Oauth2Client-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index be26575f..21edbb51 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -19,7 +19,7 @@ jobs: outputs: # Used to conditionally run publish steps and notifications client_version: ${{steps.calc_version.outputs.version}} - should_publish: ${{steps.calc_version.outputs.should_publish}} + permissions: contents: write From 2ea5274345de9e108f7fd60c53bac0b13b733b35 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 12:06:38 +1300 Subject: [PATCH 6/9] [PETOSS-829] now commits the .csproj file with new version --- .github/workflows/publish-Oauth2Client-package.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index 21edbb51..00150538 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -19,8 +19,6 @@ jobs: outputs: # Used to conditionally run publish steps and notifications client_version: ${{steps.calc_version.outputs.version}} - - permissions: contents: write pull-requests: write @@ -134,11 +132,20 @@ jobs: run: dotnet nuget push ./Xero.NetStandard.OAuth2Client/bin/Release/Xero.NetStandard.OAuth2Client.${{steps.calc_version.outputs.version}}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json working-directory: Xero-NetStandard - - name: Create client tag + - name: Commit, Push and Tag if: steps.calc_version.outputs.should_publish == 'true' run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + + # Commit the version bump + git add ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj + git commit -m "Bump OAuth2Client version to ${{steps.calc_version.outputs.version}}" + + # Push the commit to master + git push origin HEAD:master + + # Create and push the tag git tag "client-${{steps.calc_version.outputs.version}}" git push origin "client-${{steps.calc_version.outputs.version}}" working-directory: Xero-NetStandard From ac4371af8fc892e1661b9f481425fc78e78df4e1 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 12:13:21 +1300 Subject: [PATCH 7/9] [PETOSS-829] moved check for changes to explict step --- .../publish-Oauth2Client-package.yml | 63 ++++++++++++------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index 00150538..f70d00bb 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -19,6 +19,8 @@ jobs: outputs: # Used to conditionally run publish steps and notifications client_version: ${{steps.calc_version.outputs.version}} + should_publish: ${{steps.check_changes.outputs.has_changes}} + permissions: contents: write pull-requests: write @@ -32,18 +34,43 @@ jobs: path: Xero-NetStandard fetch-depth: 0 # Fetch all history for git diff - - name: Calculate OAuth2Client version - id: calc_version + - name: Check for changes + id: check_changes run: | # Get last client tag LAST_CLIENT_TAG=$(git tag -l 'client-*' --sort=-v:refname | head -n 1) + echo "Found last client tag: $LAST_CLIENT_TAG" + echo "last_client_tag=$LAST_CLIENT_TAG" >> $GITHUB_OUTPUT + + if [ -z "$LAST_CLIENT_TAG" ]; then + echo "No previous client tag found. Treating as changed (initial release)." + echo "has_changes=true" >> $GITHUB_OUTPUT + exit 0 + fi + + # Check if OAuth2Client files changed since last client tag + if git diff --name-only $LAST_CLIENT_TAG HEAD | grep -q 'Xero.NetStandard.OAuth2Client/'; then + echo "Changes detected in Xero.NetStandard.OAuth2Client/" + echo "has_changes=true" >> $GITHUB_OUTPUT + else + echo "No changes detected in Xero.NetStandard.OAuth2Client/" + echo "has_changes=false" >> $GITHUB_OUTPUT + fi + working-directory: Xero-NetStandard + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Calculate OAuth2Client version + id: calc_version + if: steps.check_changes.outputs.has_changes == 'true' + run: | + LAST_CLIENT_TAG="${{ steps.check_changes.outputs.last_client_tag }}" if [ -z "$LAST_CLIENT_TAG" ]; then # No previous client tag, start with version from csproj CURRENT_VERSION=$(grep '' ./Xero.NetStandard.OAuth2Client/Xero.NetStandard.OAuth2Client.csproj | sed 's/.*\(.*\)<\/Version>.*/\1/') echo "No previous client tag found, using csproj version: $CURRENT_VERSION" echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT - echo "should_publish=true" >> $GITHUB_OUTPUT exit 0 fi @@ -71,28 +98,18 @@ jobs: fi echo "Detected bump type: $BUMP_TYPE" - # Check if OAuth2Client files changed since last client tag - if git diff --name-only $LAST_CLIENT_TAG HEAD | grep -q 'Xero.NetStandard.OAuth2Client/'; then - echo "OAuth2Client files have changed since $LAST_CLIENT_TAG" - - # Increment version based on bump type - IFS='.' read -r c1 c2 c3 <<< "$LAST_VERSION" - if [ "$BUMP_TYPE" == "major" ]; then - NEW_VERSION="$((c1 + 1)).0.0" - elif [ "$BUMP_TYPE" == "minor" ]; then - NEW_VERSION="${c1}.$((c2 + 1)).0" - else - NEW_VERSION="${c1}.${c2}.$((c3 + 1))" - fi - - echo "Incrementing version ($BUMP_TYPE): $LAST_VERSION -> $NEW_VERSION" - echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT - echo "should_publish=true" >> $GITHUB_OUTPUT + # Increment version based on bump type + IFS='.' read -r c1 c2 c3 <<< "$LAST_VERSION" + if [ "$BUMP_TYPE" == "major" ]; then + NEW_VERSION="$((c1 + 1)).0.0" + elif [ "$BUMP_TYPE" == "minor" ]; then + NEW_VERSION="${c1}.$((c2 + 1)).0" else - echo "No changes to OAuth2Client since $LAST_CLIENT_TAG" - echo "version=$LAST_VERSION" >> $GITHUB_OUTPUT - echo "should_publish=false" >> $GITHUB_OUTPUT + NEW_VERSION="${c1}.${c2}.$((c3 + 1))" fi + + echo "Incrementing version ($BUMP_TYPE): $LAST_VERSION -> $NEW_VERSION" + echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT working-directory: Xero-NetStandard env: GH_TOKEN: ${{secrets.GITHUB_TOKEN}} From b2bb2a2e8423421bf0b47d94cdfd296f62705f76 Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 14:33:42 +1300 Subject: [PATCH 8/9] [PETOSS-829] renamed dotnet work flow to match actual purpose --- .github/workflows/{dotnet.yml => publish-Oauth2-package.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{dotnet.yml => publish-Oauth2-package.yml} (99%) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/publish-Oauth2-package.yml similarity index 99% rename from .github/workflows/dotnet.yml rename to .github/workflows/publish-Oauth2-package.yml index 23a48d77..ca7afa1d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/publish-Oauth2-package.yml @@ -1,4 +1,4 @@ -name: Publish & Release SDK +name: Publish OAuth2 Package on: workflow_dispatch: inputs: From 7589dba9a552daa1326bc8e4c3ebaa31252514cc Mon Sep 17 00:00:00 2001 From: Ryan McCarthy Date: Fri, 28 Nov 2025 15:30:31 +1300 Subject: [PATCH 9/9] [PETOSS-829] removed trigger on push --- .github/workflows/publish-Oauth2-package.yml | 8 ++++---- .github/workflows/publish-Oauth2Client-package.yml | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-Oauth2-package.yml b/.github/workflows/publish-Oauth2-package.yml index ca7afa1d..0c648431 100644 --- a/.github/workflows/publish-Oauth2-package.yml +++ b/.github/workflows/publish-Oauth2-package.yml @@ -49,11 +49,11 @@ jobs: run: dotnet build --no-restore working-directory: Xero-NetStandard - - name: Create Package for Nuget.org\ + - name: Create OAuth2 Package for Nuget.org run: dotnet pack working-directory: Xero-NetStandard - - name: Publish Package to Nuget.org + - name: Publish OAuth2 Package to Nuget.org run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Release/Xero.NetStandard.OAuth2.${{steps.get_latest_release_number.outputs.release_tag}}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json working-directory: Xero-NetStandard @@ -124,7 +124,7 @@ jobs: - name: Send slack notification on success uses: ./Xero-NetStandard/.github/actions/notify-slack with: - heading_text: "Publish job has succeeded !" + heading_text: "OAuth2 Package publish job has succeeded !" alert_type: "thumbsup" job_status: "Success" XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} @@ -149,7 +149,7 @@ jobs: - name: Send slack notification on failure uses: ./Xero-NetStandard/.github/actions/notify-slack with: - heading_text: "Publish job has failed !" + heading_text: "OAuth2 Package publish job has failed !" alert_type: "alert" job_status: "Failed" XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} diff --git a/.github/workflows/publish-Oauth2Client-package.yml b/.github/workflows/publish-Oauth2Client-package.yml index f70d00bb..9e1a050b 100644 --- a/.github/workflows/publish-Oauth2Client-package.yml +++ b/.github/workflows/publish-Oauth2Client-package.yml @@ -6,9 +6,6 @@ on: description: "CAB id for the change/release" required: true type: string - push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' # Triggers on main SDK version tags to check if Client SDK needs update jobs: check-and-publish: