Skip to content

Commit

Permalink
Change links dir
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Jul 28, 2023
1 parent 2ee0c0d commit dcb22ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 147 deletions.
149 changes: 2 additions & 147 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,159 +181,14 @@ jobs:
});
const assets = response.data;
// Save the download links to a file
require('fs').writeFileSync('download_links.txt', assets.map(asset => asset.browser_download_url).join('\n'));
require('fs').writeFileSync('links/dataset.txt', assets.map(asset => asset.browser_download_url).join('\n'));
- uses: EndBug/add-and-commit@v9
with:
add: 'download_links.txt'
add: 'links/dataset.txt'
author_email: "41898282+github-actions[bot]@users.noreply.github.com"
author_name: "commit-bot"
message: "Add download links for asset ${{ needs.generate-matrix.outputs.release_id }}"
push: true
fetch: true
pull: '--rebase --autostash'

unique_python_files:
needs: [ makepublic, generate-matrix ]
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: checkout
uses: actions/checkout@v3

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install root
run: poetry install --only-root

- name: Download links
run: cat download_links.txt

- name: Combine
run: |
poetry run pypi-data run-sql ${{ github.workspace }}/sql/unique_python_files.prql unique-python-files.parquet $(cat download_links.txt)
- name: Stats
run: |
poetry run pypi-data run-sql ${{ github.workspace }}/sql/stats.prql stats.parquet $(cat download_links.txt)
- name: Upload Assetsg
id: upload
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.generate-matrix.outputs.upload_url }}
asset_name: unique-python-files.parquet

- name: Create download links
run: |
echo "${{ steps.upload.outputs.browser_download_url }}" > only_python_download_links.txt
- uses: EndBug/add-and-commit@v9
with:
add: 'only_python_download_links.txt'
author_email: "41898282+github-actions[bot]@users.noreply.github.com"
author_name: "commit-bot"
message: "Add only python links for asset ${{ needs.generate-matrix.outputs.release_id }}"
push: true
fetch: true
pull: '--rebase --autostash'

generate_stats:
needs: [ makepublic, generate-matrix ]
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: checkout
uses: actions/checkout@v3

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install root
run: poetry install --only-root

- name: Combine
run: |
poetry run pypi-data run-sql ${{ github.workspace }}/sql/stats.prql stats.parquet $(cat download_links.txt)
#
# - name: Upload Assets
# id: upload
# uses: shogo82148/actions-upload-release-asset@v1
# with:
# upload_url: ${{ needs.generate-matrix.outputs.upload_url }}
# asset_name: unique-python-files.parquet
#
# - name: Create download links
# run: |
# echo "${{ steps.upload.outputs.browser_download_url }}" > only_python_download_links.txt
#
# - uses: EndBug/add-and-commit@v9
# with:
# add: 'only_python_download_links.txt'
# author_email: "41898282+github-actions[bot]@users.noreply.github.com"
# author_name: "commit-bot"
# message: "Add only python links for asset ${{ needs.generate-matrix.outputs.release_id }}"
# push: true
# fetch: true
# pull: '--rebase --autostash'
Empty file added links/.gitkeep
Empty file.

0 comments on commit dcb22ea

Please sign in to comment.