mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-24 20:56:50 +00:00
refactor: improve post release updates ci workflow (#525)
This commit is contained in:
14
.github/workflows/release.updates.yml
vendored
14
.github/workflows/release.updates.yml
vendored
@@ -3,6 +3,8 @@ on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
checksum_file:
|
||||
@@ -22,6 +24,18 @@ jobs:
|
||||
- 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 changes
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config --global user.name 'Jose Quintana'
|
||||
git config --global user.email '1700322+joseluisq@users.noreply.github.com'
|
||||
git add scripts/installer.sh docs/content/download-and-install.md docs/content/download-and-install.template.md
|
||||
git commit -m "docs: ${{ env.SERVER_VERSION }} [skip ci]"
|
||||
git push
|
||||
|
||||
@@ -30,7 +30,7 @@ curl --proto '=https' --tlsv1.2 -sSfL https://get.static-web-server.net | sh
|
||||
Alternatively, you can install a specific version of SWS to a custom location by setting environment variables.
|
||||
|
||||
```sh
|
||||
export SWS_INSTALL_VERSION="2.35.0" # full list at https://github.com/static-web-server/static-web-server/tags
|
||||
export SWS_INSTALL_VERSION="{{RELEASE_VERSION_NUM}}" # full list at https://github.com/static-web-server/static-web-server/tags
|
||||
export SWS_INSTALL_DIR="~/.local/bin"
|
||||
curl --proto '=https' --tlsv1.2 -sSfL https://get.static-web-server.net | sh
|
||||
```
|
||||
|
||||
@@ -21,6 +21,7 @@ cd $release_dir
|
||||
server_version_num=$(echo $SERVER_VERSION | sed "s/v//")
|
||||
|
||||
# Download precompiled binary assets
|
||||
echo "Downloading release target assets..."
|
||||
while read -r file_url; do
|
||||
curl -LO --progress-bar $file_url
|
||||
done < <(cat $release_json | jq -r ".assets[] | .browser_download_url")
|
||||
@@ -92,9 +93,9 @@ rm -rf docs/content/*.bk
|
||||
echo "Download and install page generated!"
|
||||
|
||||
# Update current installer script version
|
||||
sed -i$sed_bk -e "s/version=\".*\"/version=\"$server_version_num\"/g" $cwd/scripts/installer.sh
|
||||
rm -rf $cwd/scripts/*.bk
|
||||
echo "Installer script $server_version_num version updated!"
|
||||
sed -i$sed_bk -e "s/SWS_INSTALL_VERSION\:\-\".*\"/SWS_INSTALL_VERSION\:\-\"$server_version_num\"/g" $cwd/scripts/installer.sh
|
||||
rm -rf scripts/*.bk
|
||||
echo "Installer script's version was updated to $server_version_num!"
|
||||
|
||||
echo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user