name: release-updates on: release: types: - published permissions: contents: write pull-requests: write jobs: release_updates: runs-on: ubuntu-22.04 environment: release-updates-static-web-server steps: - name: Checkout uses: actions/checkout@v4 with: ref: master - name: Prepare shell: bash run: | echo "SERVER_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV echo "version is: ${{ env.SERVER_VERSION }}" echo "PR_BRANCH_NAME=release-docs-${{ env.SERVER_VERSION }}-$(date -u '+%d-%m-%Y')" >> $GITHUB_ENV - name: Post release updates shell: bash env: UPLOAD_CHECKSUM: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | scripts/ci/post_release_updates.sh - name: Commit post release updates shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --global user.name 'github-actions[bot]' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' git add scripts/installer.sh git add docs/content/download-and-install.md git add docs/content/download-and-install.template.md git commit --verbose -m "docs: ${{ env.SERVER_VERSION }} [skip ci]" git checkout -b ${{ env.PR_BRANCH_NAME }} git push --set-upstream origin --verbose ${{ env.PR_BRANCH_NAME }} - name: Create pull request for release updates env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh pr create \ --title "Post release ${{ env.SERVER_VERSION }} updates" \ --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." \ --base "master" \ --head "${{ env.PR_BRANCH_NAME }}" \ --label "v2" --label "enhancement" --label "documentation" --label "automated" \ --draft