Fix pip install #35
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 Release Assets | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Set current date as env variable | |
run: echo "DATETIME=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
custom_tag: v${{ env.DATETIME }} | |
tag_prefix: "" | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build notebooks | |
run: | | |
python resources/package-samples.py notebooks --strip-output --outfile notebooks-stripped.zip --notebooks all | |
python resources/package-samples.py notebooks --outfile notebooks-full.zip --notebooks all | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ env.DATETIME }} | |
release_name: Release v${{ env.DATETIME }} | |
draft: false | |
prerelease: false | |
# This pulls from the CREATE RELEASE step above, referencing | |
# it's ID to get its outputs object, which include a `upload_url`. | |
# See this blog post for more info: | |
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
- name: Upload Stripped Asset | |
id: upload-stripped-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./notebooks-stripped.zip | |
asset_name: notebooks-stripped.zip | |
asset_content_type: application/zip | |
- name: Upload Full Asset | |
id: upload-full-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./notebooks-full.zip | |
asset_name: notebooks-full.zip | |
asset_content_type: application/zip |