-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* copy old main.yml * don't ignore lists * rohbau * wip * test this * oops * try again * fix path * use while loop instead * yaml syntax * Update anki.yml * Übeltäter unescaped Semikolon * Update anki.yml * Update anki.yml * change to fixed names * test-stand * testing * add newline * add doku * patch lint * Revert "Merge branch 'main' of https://github.com/nukerxy/dhge-pi19-sem6" This reverts commit 8e2d3ad, reversing changes made to 6cf2f8c. * Revert "Revert "Merge branch 'main' of https://github.com/nukerxy/dhge-pi19-sem6"" This reverts commit 2098e50. * patch lint * reworked anki.list documentation * anki.list example demonstrate that APKG filenames can differ from Markdown names Co-authored-by: Max <[email protected]>
- Loading branch information
1 parent
a697ddc
commit 82ea079
Showing
5 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Create Anki Decks release from markdown | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
convert_via_md2apkg: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- run: npm install -g md2apkg | ||
- run: mkdir output | ||
- run: | | ||
while read -r line;do | ||
inputpath=$(echo $line | awk -F\; '{print $1}'); | ||
name=$(echo $line | awk -F\; '{print $2}'); | ||
md2apkg -o output/${name} ${inputpath}; | ||
done < "anki.list" | ||
- uses: actions/upload-artifact@master # upload decks as an artifact | ||
with: | ||
name: output | ||
path: output | ||
release_decks: | ||
runs-on: ubuntu-20.04 | ||
needs: convert_via_md2apkg | ||
if: github.ref == 'refs/heads/main' # only publish if commited to the main branch | ||
steps: | ||
- name: Retrieve saved Docker image | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: output | ||
path: output | ||
- uses: meeDamian/[email protected] # create/override a release and attach apkgs | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
tag: anki-release | ||
name: Anki Decks | ||
body: Dieses Release wurde automatisch erstellt | ||
gzip: false | ||
files: output/[A-Z]*[A-Z]-[A-Z]*[A-Z].apkg | ||
allow_override: true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
./ISR-MUELLER/README.md;ISR-MUELLER.apkg | ||
./CB-KUSCHE/README.md;CB-KUSCHE.apkg | ||
./PRO-STRASS/README.md;PRO-STRASS.apkg |