update upload-artifact #580
Workflow file for this run
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: main | |
on: | |
push: | |
branches: [master] | |
tags: ['*'] | |
pull_request: | |
branches: [master] | |
repository_dispatch: | |
types: [rsconnect_python_latest] | |
workflow_dispatch: | |
env: | |
DOCKER_TTY_FLAGS: '' | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
include: | |
- os: macos-latest | |
python-version: '3.9' | |
runs-on: ${{ matrix.os }} | |
name: test (py${{ matrix.python-version }} ${{ matrix.os }}) | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --prune --unshallow | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: echo "PYTHONPATH=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
- run: make prereqs | |
- run: make version | |
- run: make test | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --prune --unshallow | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- run: echo "PYTHONPATH=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
- run: make prereqs | |
- run: make version | |
- run: make yarn | |
- run: make lint | |
selenium: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --prune --unshallow | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8.x | |
- run: echo "PYTHONPATH=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
- run: make image3.8 | |
- run: make -C selenium build | |
- run: make -C selenium clean | |
- run: make -C selenium test-env-up | |
- run: make -C selenium jupyter-up | |
- run: make -C selenium test | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: selenium-logs | |
path: '**/*.log' | |
distributions: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --prune --unshallow | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8.x | |
- run: echo "PYTHONPATH=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
- run: make prereqs | |
- run: make dist | |
id: create_dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: distributions | |
path: dist/ | |
- run: pip install -vvv ${{ steps.create_dist.outputs.whl }} | |
- run: python -c 'import rsconnect_jupyter;print(rsconnect_jupyter.__version__)' | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.create_dist.outputs.whl }} | |
asset_name: ${{ steps.create_dist.outputs.whl_basename }} | |
asset_content_type: application/x-wheel+zip | |
- uses: aws-actions/configure-aws-credentials@v1 | |
id: creds | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
run: make sync-latest-to-s3 | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
docs: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: extractions/setup-just@v1 | |
- uses: actions/checkout@v2 | |
- run: just docs/ image build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/site/ | |
- uses: aws-actions/configure-aws-credentials@v1 | |
id: creds | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
run: make sync-latest-docs-to-s3 | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && (contains(github.ref, 'b') == false) | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.DOCS_AWS_ROLE }} | |
aws-region: us-east-1 | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && (contains(github.ref, 'b') == false) | |
run: make promote-docs-in-s3 |