Skip to content

Release Google.Cloud.Logging.Console version 1.3.1 #12505

Release Google.Cloud.Logging.Console version 1.3.1

Release Google.Cloud.Logging.Console version 1.3.1 #12505

Workflow file for this run

name: Detect differences (PR only)
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
diff:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 100
# The GitHub checkout action leaves the repo in a slightly awkward
# state. This tidies it up.
- name: Set up git branches
run: |
git checkout -b pr-head
git checkout -b main ${{ github.event.pull_request.base.sha }}
git checkout pr-head
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Detect PR changes
env:
ALLOW_BREAKING_CHANGES: ${{contains(github.event.pull_request.labels.*.name, 'allow breaking changes')}}
run: |
if [[ $ALLOW_BREAKING_CHANGES == "true" ]]
then
SCRIPT_OPTION=--allow-breaking-changes
fi
# Run the diff, recording the results
echo "**Pull request diff results**" >> diff.txt
set -o pipefail
./detect-pr-changes.sh $SCRIPT_OPTION 2>&1 | tee -a diff.txt
set +o pipefail
# The purpose of (success() || failure()) in the condition is to
# make sure we post a comment on both success and failure, but *not*
# if the job is cancelled.
- name: Post diff as a comment for branches on target fork
if: (success() || failure()) && github.event.pull_request.head.repo.full_name == github.repository
run: |
./prepare-release.sh add-pr-comment diff.txt \
${{github.event.pull_request.number }} \
${{secrets.GITHUB_TOKEN}}