2021-10-18 01:54:06 +00:00
|
|
|
# Actions to run after releasing a version, like generating documentation via mkdocs or notifying packaging repos.
|
2021-06-24 03:34:39 +00: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 05:09:10 +00:00
|
|
|
GIT_USER: "github-actions[bot]"
|
|
|
|
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
|
2021-06-24 03:34:39 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set env
|
|
|
|
run: |
|
|
|
|
export RELEASE_VERSION=${{ github.event.release.tag_name }}
|
2021-06-26 20:11:40 +00:00
|
|
|
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
|
2021-06-24 03:34:39 +00:00
|
|
|
|
|
|
|
- name: Test env
|
|
|
|
run: |
|
|
|
|
echo $RELEASE_VERSION
|
|
|
|
|
2021-10-10 22:16:21 +00:00
|
|
|
- name: Make sure you're not on master/main/nightly...
|
2021-06-24 03:34:39 +00:00
|
|
|
run: |
|
2021-10-10 22:16:21 +00:00
|
|
|
if [[ $RELEASE_VERSION == "master" || $RELEASE_VERSION == "main" || $RELEASE_VERSION == "nightly" ]]; then
|
2021-06-24 03:34:39 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
|
2021-10-10 22:16:21 +00:00
|
|
|
- name: Install Python dependencies
|
2021-10-10 22:17:20 +00:00
|
|
|
run: pip install -r docs/requirements.txt
|
2021-06-24 03:34:39 +00: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)
|
|
|
|
|
|
|
|
- name: Build and deploy docs with mike
|
|
|
|
run: |
|
|
|
|
cd docs
|
|
|
|
mike deploy --push --update-aliases ${RELEASE_VERSION} stable
|
|
|
|
|
2021-12-21 02:23:04 +00:00
|
|
|
# - name: Deploy to CF Pages
|
|
|
|
# run: |
|
|
|
|
# curl -X POST ${{ secrets.CFP_HOOK }}
|
2021-12-19 20:07:37 +00:00
|
|
|
|
2021-06-24 03:34:39 +00:00
|
|
|
packaging:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Test env
|
|
|
|
run: |
|
|
|
|
echo $RELEASE_VERSION
|
|
|
|
|
|
|
|
- name: Make sure you're not on master...
|
|
|
|
run: |
|
|
|
|
if [[ $RELEASE_VERSION == "master" ]]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Make sure you're not on nightly...
|
|
|
|
run: |
|
|
|
|
if [[ $RELEASE_VERSION == "nightly" ]]; then
|
|
|
|
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"'" } }'
|