Upload packages #1166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload packages | |
on: | |
push: | |
# Prevents triggering multiple workflows in PRs. Workflows triggered from | |
# the same commit shouldn't run simultaneously because they're overwriting | |
# each other's packages on Anaconda. | |
branches: [ master ] | |
paths-ignore: | |
- '.github/workflows/tuttest.yml' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- '.github/workflows/tuttest.yml' | |
- 'README.md' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 23 * * *' # run daily at 23:00 (UTC) | |
env: | |
OS_NAME: linux | |
jobs: | |
Build: | |
uses: ./.github/workflows/Build.yml | |
secrets: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
ANACONDA_USER: ${{ secrets.ANACONDA_USER }} | |
Upload: | |
needs: Build | |
if: always() && (github.event_name != 'pull_request') && (github.ref == 'refs/heads/master') | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Upload packages | |
run: | | |
# Required internally by the scripts to locate other scripts. | |
export CI_SCRIPTS_PATH="$(pwd)/ci" | |
./ci/install.sh | |
./ci/upload-packages.sh | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
ANACONDA_USER: ${{ secrets.ANACONDA_USER }} | |
Cleanup: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cleanup Anaconda | |
run: | | |
# Required internally by the scripts to locate other scripts. | |
export CI_SCRIPTS_PATH="$(pwd)/ci" | |
./ci/install.sh | |
./ci/cleanup-anaconda.sh | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
ANACONDA_USER: ${{ secrets.ANACONDA_USER }} |