fork/static-web-server

git clone https://git.julia.blue/fork/static-web-server

Jose Quintanadocs: v2.37.0 [skip ci]ac72d4e

allow-symlink
2.1 KiB62 linesraw
1name: release-updates
2on:
3  release:
4    types:
5      - published
6
7permissions:
8  contents: write
9  pull-requests: write
10
11jobs:
12  release_updates:
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          echo "PR_BRANCH_NAME=release-docs-${{ env.SERVER_VERSION }}-$(date -u '+%d-%m-%Y')" >> $GITHUB_ENV
27
28      - name: Post release updates
29        shell: bash
30        env:
31          UPLOAD_CHECKSUM: true
32          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33        run: |
34          scripts/ci/post_release_updates.sh
35
36      - name: Commit post release updates
37        shell: bash
38        env:
39          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40        run: |
41          git config --global user.name 'github-actions[bot]'
42          git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
43
44          git add scripts/installer.sh
45          git add docs/content/download-and-install.md
46          git add docs/content/download-and-install.template.md
47
48          git commit --verbose -m "docs: ${{ env.SERVER_VERSION }} [skip ci]"
49          git checkout -b ${{ env.PR_BRANCH_NAME }}
50          git push --set-upstream origin --verbose ${{ env.PR_BRANCH_NAME }}
51
52      - name: Create pull request for release updates
53        env:
54          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55        run: |
56          gh pr create \
57            --title "Post release ${{ env.SERVER_VERSION }} updates" \
58            --body "An automated PR containing documentation and script installer updates corresponding to the current release \`${{ env.SERVER_VERSION }}\`.\n\nSee https://static-web-server.net/download-and-install/ for more details." \
59            --base "master" \
60            --head "${{ env.PR_BRANCH_NAME }}" \
61            --label "v2" --label "enhancement" --label "documentation" --label "automated" \
62            --draft