2023-06-18 08:00:10 +00:00
|
|
|
# Actions to run after releasing a version, like:
|
|
|
|
# - Generating documentation via mkdocs
|
|
|
|
# - Notifying packaging repos
|
|
|
|
# - Automatically creating winget packages
|
2022-10-25 01:24:08 -04:00
|
|
|
|
2021-06-23 23:34:39 -04:00
|
|
|
name: post-release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Assign commit authorship to official Github Actions bot when pushing to the `gh-pages` branch:
|
2021-09-20 01:09:10 -04:00
|
|
|
GIT_USER: "github-actions[bot]"
|
|
|
|
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
|
2021-06-23 23:34:39 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-06-02 18:04:51 -04:00
|
|
|
- name: Checkout repository
|
2023-06-11 06:16:29 +00:00
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2021-06-23 23:34:39 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set env
|
|
|
|
run: |
|
|
|
|
export RELEASE_VERSION=${{ github.event.release.tag_name }}
|
2021-06-26 16:11:40 -04:00
|
|
|
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
|
2021-06-23 23:34:39 -04:00
|
|
|
|
|
|
|
- name: Test env
|
|
|
|
run: |
|
|
|
|
echo $RELEASE_VERSION
|
|
|
|
|
2021-10-10 18:16:21 -04:00
|
|
|
- name: Make sure you're not on master/main/nightly...
|
2021-06-23 23:34:39 -04:00
|
|
|
run: |
|
2021-10-10 18:16:21 -04:00
|
|
|
if [[ $RELEASE_VERSION == "master" || $RELEASE_VERSION == "main" || $RELEASE_VERSION == "nightly" ]]; then
|
2021-06-23 23:34:39 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-06-11 06:16:29 +00:00
|
|
|
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
|
2021-06-23 23:34:39 -04:00
|
|
|
with:
|
2023-02-03 03:25:25 -05:00
|
|
|
python-version: 3.11
|
2021-06-23 23:34:39 -04:00
|
|
|
|
2021-10-10 18:16:21 -04:00
|
|
|
- name: Install Python dependencies
|
2021-10-10 18:17:20 -04:00
|
|
|
run: pip install -r docs/requirements.txt
|
2021-06-23 23:34:39 -04:00
|
|
|
|
|
|
|
- name: Configure git user and email
|
|
|
|
run: |
|
|
|
|
git config --global user.name ${GIT_USER}
|
|
|
|
git config --global user.email ${GIT_EMAIL}
|
|
|
|
echo Name: $(git config --get user.name)
|
|
|
|
echo Email: $(git config --get user.email)
|
|
|
|
|
2022-01-01 17:45:44 -08:00
|
|
|
- name: Build and deploy docs with mike as the latest stable branch
|
2021-06-23 23:34:39 -04:00
|
|
|
run: |
|
|
|
|
cd docs
|
2022-01-01 17:45:44 -08:00
|
|
|
OLD_STABLE_VERSION=$(mike list stable | grep -Po '([0-9]+.[0-9]+.[0-9]+)' | head -n1)
|
|
|
|
echo ${OLD_STABLE_VERSION}
|
|
|
|
mike retitle --push stable ${OLD_STABLE_VERSION}
|
2021-06-23 23:34:39 -04:00
|
|
|
mike deploy --push --update-aliases ${RELEASE_VERSION} stable
|
2022-01-01 17:45:44 -08:00
|
|
|
mike retitle --push ${RELEASE_VERSION} "${RELEASE_VERSION} (stable)"
|
2021-06-23 23:34:39 -04:00
|
|
|
|
2023-06-18 08:00:10 +00:00
|
|
|
chocolatey:
|
2021-06-23 23:34:39 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-06-02 18:04:51 -04:00
|
|
|
- name: Checkout repository
|
2023-06-11 06:16:29 +00:00
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2021-06-23 23:34:39 -04:00
|
|
|
|
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Test env
|
|
|
|
run: |
|
|
|
|
echo $RELEASE_VERSION
|
|
|
|
|
2023-06-19 00:13:24 +00:00
|
|
|
- name: Make sure you're not on master/main/nightly...
|
2021-06-23 23:34:39 -04:00
|
|
|
run: |
|
2023-06-19 00:13:24 +00:00
|
|
|
if [[ $RELEASE_VERSION == "master" || $RELEASE_VERSION == "main" || $RELEASE_VERSION == "nightly" ]]; then
|
2021-06-23 23:34:39 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Trigger choco
|
|
|
|
run: |
|
|
|
|
curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \
|
|
|
|
-H 'Accept: application/vnd.github.everest-preview+json' \
|
|
|
|
-u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
|
|
|
|
--data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
|
2023-06-18 08:00:10 +00:00
|
|
|
|
|
|
|
winget:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2023-06-25 15:37:15 -04:00
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Test env
|
|
|
|
run: |
|
|
|
|
echo $RELEASE_VERSION
|
|
|
|
|
2023-06-19 00:13:24 +00:00
|
|
|
- name: Make sure you're not on master/main/nightly...
|
|
|
|
run: |
|
|
|
|
if [[ $RELEASE_VERSION == "master" || $RELEASE_VERSION == "main" || $RELEASE_VERSION == "nightly" ]]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-06-18 08:00:10 +00:00
|
|
|
- uses: vedantmgoyal2009/winget-releaser@79853c0938cc9946c1ec3cdd1b2e761bb0372b8c # v2
|
|
|
|
with:
|
|
|
|
identifier: Package.Identifier
|
|
|
|
installers-regex: '^bottom_x86_64_installer\.msi$'
|
|
|
|
token: ${{ secrets.WINGET_TOKEN }}
|