v0.0.1 #6
Workflow file for this run
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
name: "Release" | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build-linux-x86_64-extension: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-linux-x86_64-extension | |
path: dist/* | |
build-macos-x86_64-extension: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-macos-x86_64-extension | |
path: dist/* | |
build-macos-aarch64-extension: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-macos-aarch64-extension | |
path: dist/* | |
build-windows-x86_64-extension: | |
runs-on: windows-2019 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- run: nmake /f Makefile.vc loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-windows-x86_64-extension | |
path: dist/* | |
build-android-extensions: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platforms: | |
[ | |
{ name: android-aarch64, cc: aarch64-linux-android21-clang }, | |
{ name: android-i686, cc: i686-linux-android21-clang }, | |
{ name: android-x86_64, cc: x86_64-linux-android21-clang }, | |
{ name: android-armv7a, cc: armv7a-linux-androideabi21-clang }, | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- uses: android-actions/setup-android@v3 | |
- run: | | |
sdkmanager --install "ndk;27.0.12077973" | |
echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973" >> $GITHUB_ENV | |
- run: | | |
ls $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/ | |
ls $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin | |
- run: | | |
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH | |
make CC=${{ matrix.platforms.cc }} \ | |
AR=llvm-ar \ | |
RANLIB=llvm-ranlib \ | |
STRIP=llvm-strip loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-${{ matrix.platforms.name }}-extension | |
path: dist/*.so | |
build-ios-extensions: | |
runs-on: ${{ matrix.platforms.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platforms: [ | |
{ | |
name: ios-aarch64, | |
target: arm64-apple-ios, | |
sdk: iphoneos, | |
runner: macos-14, | |
}, | |
#{ | |
# name: ios-x86_64, | |
# target: x86_64-apple-ios, | |
# sdk: iphoneos, | |
# runner: macos-12, | |
#}, | |
{ | |
name: iossimulator-aarch64, | |
target: arm64-apple-ios-simulator, | |
sdk: iphonesimulator, | |
runner: macos-14, | |
}, | |
{ | |
name: iossimulator-x86_64, | |
target: x86_64-apple-ios-simulator, | |
sdk: iphonesimulator, | |
runner: macos-14, | |
}, | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- run: make CFLAGS="-target ${{ matrix.platforms.target }} -isysroot $(xcrun -sdk ${{ matrix.platforms.sdk }} --show-sdk-path) -fembed-bitcode -DNDEBUG=1" loadable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sqlite-better-trigram-${{ matrix.platforms.name }}-extension | |
path: dist/* | |
dist: | |
runs-on: ubuntu-latest | |
needs: | |
[ | |
build-linux-x86_64-extension, | |
build-macos-x86_64-extension, | |
build-macos-aarch64-extension, | |
build-windows-x86_64-extension, | |
build-android-extensions, | |
build-ios-extensions, | |
] | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-linux-x86_64-extension | |
path: dist/linux-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-macos-x86_64-extension | |
path: dist/macos-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-macos-aarch64-extension | |
path: dist/macos-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-windows-x86_64-extension | |
path: dist/windows-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-android-aarch64-extension | |
path: dist/android-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-android-i686-extension | |
path: dist/android-i686 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-android-x86_64-extension | |
path: dist/android-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-android-armv7a-extension | |
path: dist/android-armv7a | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-android-armv7a-extension | |
path: dist/android-armv7a | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-ios-aarch64-extension | |
path: dist/ios-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-iossimulator-aarch64-extension | |
path: dist/iossimulator-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sqlite-better-trigram-iossimulator-x86_64-extension | |
path: dist/iossimulator-x86_64 | |
- run: | | |
curl -L https://github.com/asg017/sqlite-dist/releases/download/v0.0.1-alpha.16/sqlite-dist-x86_64-unknown-linux-gnu.tar.xz \ | |
| tar xfJ - --strip-components 1 | |
- run: ./sqlite-dist ./sqlite-dist.toml --input dist/ --output distx/ --version $(cat VERSION) | |
- run: | | |
gh release upload --clobber ${{ github.ref_name }} \ | |
distx/amalgamation/* \ | |
distx/github_releases/* \ | |
distx/checksums.txt \ | |
distx/sqlite-dist-manifest.json \ | |
distx/install.sh | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
registry-url: "https://registry.npmjs.org" | |
- run: | | |
npm publish --access public distx/npm/sqlite-better-trigram-darwin-arm64.tar.gz | |
npm publish --access public distx/npm/sqlite-better-trigram-darwin-x64.tar.gz | |
npm publish --access public distx/npm/sqlite-better-trigram-linux-x64.tar.gz | |
npm publish --access public distx/npm/sqlite-better-trigram-windows-x64.tar.gz | |
npm publish --access public distx/npm/sqlite-better-trigram.tar.gz | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |