@@ -16,7 +16,7 @@ permissions:
1616 contents : write
1717
1818jobs :
19- release :
19+ build-firmware :
2020 runs-on : ubuntu-latest
2121 steps :
2222 - uses : actions/checkout@v4
5151 EOF
5252 (cd dist && zip -r "../echolocation-cores3-${TAG}.zip" "echolocation-cores3-${TAG}")
5353
54+ - name : Upload firmware artifacts
55+ uses : actions/upload-artifact@v4
56+ with :
57+ name : firmware-release
58+ path : |
59+ dist/echolocation-cores3-${{ inputs.tag }}.zip
60+ firmware/.pio/build/m5stack-cores3/firmware.bin
61+
62+ generate-audio :
63+ runs-on : macos-latest
64+ steps :
65+ - uses : actions/checkout@v4
66+
67+ - uses : actions/setup-node@v4
68+ with :
69+ node-version : " 20"
70+
71+ - name : Generate microSD speech files
72+ working-directory : scripts/generate-tts
73+ run : npm install && npm run generate
74+
75+ - name : Package microSD audio
76+ env :
77+ TAG : ${{ inputs.tag }}
78+ run : |
79+ DIST=dist/echolocation-sd-audio-${TAG}
80+ mkdir -p "$DIST/audio/keys"
81+ cp sd-card/audio/keys/*.wav "$DIST/audio/keys/"
82+ cat > "$DIST/SD_CARD.txt" << 'EOF'
83+ Copy the contents of this folder to the root of a FAT32 microSD card.
84+ The card should contain /audio/keys/*.wav (same layout as this archive).
85+ Insert the card into the CoreS3 SD slot before use.
86+ EOF
87+ (cd dist && zip -r "../echolocation-sd-audio-${TAG}.zip" "echolocation-sd-audio-${TAG}")
88+
89+ - name : Upload audio artifacts
90+ uses : actions/upload-artifact@v4
91+ with :
92+ name : sd-audio
93+ path : dist/echolocation-sd-audio-${{ inputs.tag }}.zip
94+
95+ release :
96+ needs : [build-firmware, generate-audio]
97+ runs-on : ubuntu-latest
98+ steps :
99+ - uses : actions/download-artifact@v4
100+ with :
101+ path : artifacts
102+
54103 - name : Create GitHub release
55104 uses : softprops/action-gh-release@v2
56105 with :
59108 prerelease : ${{ inputs.prerelease }}
60109 generate_release_notes : true
61110 files : |
62- dist/echolocation-cores3-${{ inputs.tag }}.zip
63- firmware/.pio/build/m5stack-cores3/firmware.bin
111+ artifacts/firmware-release/dist/echolocation-cores3-${{ inputs.tag }}.zip
112+ artifacts/firmware-release/firmware/.pio/build/m5stack-cores3/firmware.bin
113+ artifacts/sd-audio/dist/echolocation-sd-audio-${{ inputs.tag }}.zip
64114 env :
65115 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments