bottom/.github/workflows/post-deploy.yml
2021-02-18 01:18:04 -05:00

46 lines
1.4 KiB
YAML

# A short amount of actions to run after releasing. This is mostly just to trigger other repos to run specific actions.
name: post-deploy script
on:
release:
types: [published]
jobs:
post-deploy:
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 homebrew
run: |
curl -X POST https://api.github.com/repos/ClementTsang/homebrew-bottom/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
--data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
- 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"'" } }'