File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 files : |
7373 cards-${{ matrix.language }}.apkg
7474 cards-${{ matrix.language }}.pdf
75+
76+ combined :
77+ runs-on : macos-14
78+ steps :
79+ - name : Checkout
80+ uses : actions/checkout@v6
81+
82+ - name : Install Nix
83+ uses : cachix/install-nix-action@v26
84+ with :
85+ nix_path : nixpkgs=channel:nixos-23.11
86+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
87+
88+ - name : Build combined Anki deck with Nix
89+ run : |
90+ nix develop --command bash -c 'make build-combined'
91+
92+ - name : Upload combined deck to workflow run
93+ uses : actions/upload-artifact@v7
94+ with :
95+ name : cards-combined
96+ path : cards-combined.apkg
97+ if-no-files-found : error
98+
99+ - name : Release
100+ if : startsWith(github.ref, 'refs/tags/v')
101+ uses : softprops/action-gh-release@v2
102+ with :
103+ files : cards-combined.apkg
Original file line number Diff line number Diff line change 11.direnv
2+ cards-combined.md
3+ cards-combined.apkg
Original file line number Diff line number Diff line change @@ -11,6 +11,25 @@ build:
1111 cd wolfram-language && make build
1212
1313
14+ cards-combined.md : rust/cards.md godot/cards.md sqlite/cards.md wolfram-language/cards.md
15+ printf -- ' ---\nname: Coding Flashcards\n---\n' > $@
16+ for f in $^; do \
17+ dir=$$(dirname "$$f" ) ; \
18+ awk -v dir=" $$ dir" ' BEGIN{seen=0} \
19+ /^---$$ / && seen< 2 {seen++; next} \
20+ seen> =2 {gsub(/\.\/ images\/ /, " images/" ); gsub(/images\/ /, dir " /images/" ); print}' \
21+ " $$ f" >> $@ ; \
22+ done
23+
24+
25+ cards-combined.apkg : cards-combined.md
26+ anki-panky $<
27+
28+
29+ .PHONY : build-combined
30+ build-combined : cards-combined.apkg
31+
32+
1433.PHONY : test
1534test :
1635 cd rust && make test
2140
2241.PHONY : clean
2342clean :
43+ rm -f cards-combined.md cards-combined.apkg
2444 cd rust && make clean
2545 cd godot && make clean
2646 cd sqlite && make clean
You can’t perform that action at this time.
0 commit comments