-
Notifications
You must be signed in to change notification settings - Fork 164
38 lines (33 loc) · 1.24 KB
/
ci-release.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
name: Release
on:
push:
branches: [ main ]
tags: ["release-*.*.*"]
jobs:
release:
if: ${{ github.repository == 'jaegertracing/documentation' && startsWith(github.ref, 'refs/tags/release-') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Attempt release
shell: bash
run: |
git config user.name "jaegertracingbot"
git config user.email "[email protected]"
# git config credential.helper "store --file=.git/credentials"
# echo "https://${{ secrets.JAEGERTRACINGBOT_GITHUB_TOKEN }}" > .git/credentials
export RELEASE_TAG=${GITHUB_REF##*/}
./scripts/release.sh
- name: GH CLI create PR
run: |
export TAG=${GITHUB_REF##*/}
git checkout -b gen-release-${TAG} # branch is need for GH CLI
git push origin gen-release-${TAG} # branch has to be on remote before PR is opened
gh pr create --base main --title "Release ${TAG}" --body "Release ${TAG}. This PR is created from CI and is part of the release process."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}