Skip to content

Fix naming of artifacts #7

Fix naming of artifacts

Fix naming of artifacts #7

Workflow file for this run

name: Generate Anki Packages
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x environment
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install markdown-anki-decks
run: |
python -m venv venv
source venv/bin/activate
pip install markdown-anki-decks
- name: Generate Anki packages and compress
run: |
source venv/bin/activate
for dir in */ ; do
if [[ -d "$dir" && ! -L "$dir" && "$dir" != "*/" ]]; then
dirname=$(basename "$dir")
result_dir="${dirname}_Result"
mkdir -p "$result_dir"
mdankideck "$dir" "$result_dir"
tar -czvf "${dirname}_cards.tar.gz" -C "$result_dir" .
fi
done
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: flashcards
path: |
*_cards.tar.gz