-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.91 KB
/
release_patch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Create core module release patch
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
sprintVersion:
required: true
type: string
description: The full sprint version including patch number, e.g. 1.245.2
jobs:
create-release-patch:
# Only allow this workflow to be run on release branches.
if: startsWith(github.ref_name, 'release/')
runs-on: ubuntu-latest
steps:
# Will check out the branch, update version.go, and create a new tag.
# E.g. if the sprint version is 1.245.2, it will:
# - set the "Version" string constant to "1.245.2"
# - create a tag named v1.245.2
- uses: actions/checkout@v3
- name: Create release patch and tag
env:
SPRINT_VERSION_WITH_PATCH: ${{ inputs.sprintVersion }}
run: |
[[ ${{ inputs.sprintVersion }} ]] || { echo "Required input sprintVersion not set, exiting."; exit 1; }
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git config push.autoSetupRemote true
sh update_version.sh
git add .
git commit -m "Release $SPRINT_VERSION_WITH_PATCH"
git tag -a core/v$SPRINT_VERSION_WITH_PATCH -m "Release $SPRINT_VERSION_WITH_PATCH"
git push --follow-tags
# Update the Go modules index so that "go get github.com/dynatrace-oss/opentelemetry-exporter-go/core"
# will resolve to the latest tag.
# Users may install a specific version, e.g. "go get github.com/dynatrace-oss/opentelemetry-exporter-go/[email protected]"
- uses: actions/setup-go@v3
- name: Update Go modules index
env:
SPRINT_VERSION_WITH_PATCH: ${{ inputs.sprintVersion }}
run: GOPROXY=proxy.golang.org go list -m github.com/dynatrace-oss/opentelemetry-exporter-go/core@v$SPRINT_VERSION_WITH_PATCH