diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 03467be..0bd15fb 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -77,14 +77,25 @@ jobs: git config --global core.symlinks false make update make libcodex + + - name: Package artifacts (Linux / macOS) + if: matrix.target.os != 'windows-latest' + run: | + if [ "$(uname)" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y zip; fi + zip -j codex-${{ matrix.target.os }}-${{ matrix.target.cpu }}.zip vendor/nim-codex/build/libcodex.${{ matrix.target.lib_ext }} vendor/nim-codex/library/libcodex.h + + - name: Package artifacts (Windows) + if: matrix.target.os == 'windows-latest' + shell: msys2 {0} + run: | + 7z a codex-${{ matrix.target.os }}-${{ matrix.target.cpu }}.zip -si:libcodex.dll < vendor/nim-codex/build/libcodex.dll + 7z a codex-${{ matrix.target.os }}-${{ matrix.target.cpu }}.zip -si:libcodex.h < vendor/nim-codex/library/libcodex.h - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: codex-${{ matrix.target.os }}-${{ matrix.target.cpu }} - path: | - vendor/nim-codex/build/libcodex.* - vendor/nim-codex/library/libcodex.h + path: codex-${{ matrix.target.os }}-${{ matrix.target.cpu }}.zip if-no-files-found: error publish-release: @@ -98,6 +109,6 @@ jobs: - name: Create release uses: softprops/action-gh-release@v2 with: - body_path: ${{ github.workspace }}-RELEASE.md + body_path: ./RELEASE.md files: dist/** draft: true