Remove redundant renaming step #10
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: Database | |
on: | |
push: | |
branches: | |
- "master" | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 0 1 * *' | |
jobs: | |
generate_tsv_files: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
type: ['database', 'suffix-array'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
id: cache | |
with: | |
shared-key: ${{ env.CACHE_KEY }} | |
- run: cd scripts/helper_scripts/unipept-database-rs && cargo fetch | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
- run: ./scripts/build_binaries.sh | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Install required utilities | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install git curl unzip gawk sqlite3 libsqlite3-dev pv nodejs wget uuid-runtime pigz lz4 parallel | |
- name: Prepare temporary directories | |
run: sudo mkdir -p "index" "unipept-temp" | |
- name: Generate tsv.gz files | |
shell: bash | |
run: sudo ./scripts/build_database.sh -i "index" -d "unipept-temp" -m "256M" "${{ matrix.type }}" "swissprot" "https://ftp.expasy.org/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.xml.gz" "output" | |
- name: Zip all tsv.gz files | |
shell: bash | |
run: zip -r output/${{ matrix.type }}.zip output/*.tsv.gz | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: database-${{ steps.date.outputs.date }} | |
release_name: Database ${{ steps.date.outputs.date }} | |
draft: false | |
prerelease: false | |
- name: Upload Static Database Release Asset | |
id: upload-database-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: output/${{ matrix.type }}.zip | |
asset_name: ${{ matrix.type }}-${{ steps.date.outputs.date }}.zip | |
asset_content_type: application/zip |