Skip to content

Add exception for ManualInstrumentation (until v3 is released) #67

Add exception for ManualInstrumentation (until v3 is released)

Add exception for ManualInstrumentation (until v3 is released) #67

name: Auto version bump on release completed
on:
release:
types: [published]
jobs:
bump_version:
# If this is a hotfix release, _don't_ do a version bump
# If this is a 1.x release, do the version bump in the release/1.x branch
# If this is a 2.x release, do the version bump in the release/2.x branch
# If this is a 3.x.0 release, do the version bump on master

Check failure on line 13 in .github/workflows/auto_create_version_bump_pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/auto_create_version_bump_pr.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
if: !endsWith(github.event.release.tag_name, '.0')
runs-on: windows-latest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: "Select branch"
id: select_branch
run: |
if( "${{ github.event.release.tag_name}}".StartsWith("v1.")) {
echo "::set-output name=ref::release/1.x"
# TODO: Uncomment the following once we cut the release/2.x branch and merge v3
# } elseif("${{ github.event.release.tag_name}}".StartsWith("v2.")) {
# echo "::set-output name=ref::release/2.x"
} else {
echo "::set-output name=ref::master"
}
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ steps.select_branch.outputs.ref }}
- name: "Configure Git Credentials"
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.100'
- name: "Update Changelog"
run: .\tracer\build.ps1 UpdateChangeLog
env:
RELEASE_NOTES: ${{ github.event.release.body }}
- name: "CalculateNextVersion"
run: .\tracer\build.ps1 CalculateNextVersion
id: versions
- name: "Bump Version"
run: .\tracer\build.ps1 UpdateVersion
env:
NewVersion: ${{ steps.versions.outputs.version }}
NewIsPrerelease: ${{ steps.versions.outputs.isprerelease }}
- name: "Verify Changes"
id: changes
run: .\tracer\build.ps1 VerifyChangedFilesFromVersionBump
- name: Create Pull Request
id: pr
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "version-bump-${{steps.versions.outputs.full_version}}"
commit-message: "[Version Bump] ${{steps.versions.outputs.full_version}}"
delete-branch: true
title: "[Version Bump] ${{steps.versions.outputs.full_version}}"
reviewers: "DataDog/apm-dotnet"
body: "${{steps.changes.outputs.release_notes}}"
- name: "Close previous milestone"
run: .\tracer\build.ps1 CloseMilestone
env:
Version: ${{steps.versions.outputs.previous_version}}
- name: Display output
run: |
echo "Pull Request Number - ${{ steps.pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.pr.outputs.pull-request-url }}"