Skip to content

Commit 20447d7

Browse files
committed
github actions
1 parent f101cf7 commit 20447d7

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/release.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v2.[0-9]+.[0-9]+'
6+
- 'v2.[0-9]+.[0-9]+-beta.[0-9]+'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
checksum_file:
13+
runs-on: ubuntu-22.04
14+
environment: release-updates-static-web-server
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: master
20+
21+
- name: Prepare
22+
shell: bash
23+
run: |
24+
echo "SERVER_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
25+
echo "version is: ${{ env.SERVER_VERSION }}"
26+
27+
- name: Post release updates
28+
shell: bash
29+
env:
30+
UPLOAD_CHECKSUM: true
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
scripts/ci/post_release_updates.sh
34+
35+
- name: Commit post release updates changes
36+
shell: bash
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
git config --global user.name 'github-actions[bot]'
41+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
42+
git add scripts/installer.sh
43+
git add docs/content/download-and-install.md
44+
git add docs/content/download-and-install.template.md
45+
git commit --verbose -m "docs: ${{ env.SERVER_VERSION }} [skip ci]"
46+
git checkout -b release-docs-${{ env.SERVER_VERSION }}
47+
git push --verbose
48+
49+
- name: Create merge request
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
run: |
53+
gh pr create \
54+
--title "Documentation for release ${{ env.SERVER_VERSION }} [skip ci]" \
55+
--body "This PR updates the corresponding documentation pages for the current release \`${{ env.SERVER_VERSION }}\`." \
56+
--base "master" \
57+
--head "release-docs-${{ env.SERVER_VERSION }}" \
58+
--label "v2" --label "enhancement" --label "documentation"

0 commit comments

Comments
 (0)