Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
6.8 KiB
210 lines
6.8 KiB
name: Release artifacts
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
push_server_to_docker_registry:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: docker/setup-buildx-action@v1
|
|
- uses: docker/metadata-action@v3
|
|
id: docker_meta
|
|
with:
|
|
images: |
|
|
${{ github.repository }}
|
|
ghcr.io/${{ github.repository }}
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
- uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
file: server/Dockerfile
|
|
pull: true
|
|
push: true
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
publish_rocksdb_crate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- run: cargo login $CRATES_IO_TOKEN
|
|
env:
|
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
- run: cargo publish
|
|
working-directory: ./rocksdb-sys
|
|
|
|
publish_lib_crate:
|
|
runs-on: ubuntu-latest
|
|
needs: publish_rocksdb_crate
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- run: cargo login $CRATES_IO_TOKEN
|
|
env:
|
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
- run: cargo publish
|
|
working-directory: ./lib
|
|
|
|
publish_server_crate:
|
|
runs-on: ubuntu-latest
|
|
needs: publish_lib_crate
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- run: cargo login $CRATES_IO_TOKEN
|
|
env:
|
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
- run: cargo publish
|
|
working-directory: ./server
|
|
|
|
python_wheel_linux:
|
|
runs-on: ubuntu-latest
|
|
needs: publish_lib_crate
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: sed -i 's/path="..\/lib", //g' python/Cargo.toml
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
manylinux: 2014
|
|
container: messense/manylinux2014-cross:x86_64
|
|
command: publish
|
|
args: -m python/Cargo.toml --cargo-extra-args="--no-default-features --features vendored" --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
publish_pypi_mac:
|
|
runs-on: macos-latest
|
|
needs: publish_lib_crate
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
command: publish
|
|
args: -m python/Cargo.toml --universal2 -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
command: publish
|
|
args: -m python/Cargo.toml --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
python_wheel_windows:
|
|
runs-on: windows-latest
|
|
needs: publish_lib_crate
|
|
strategy:
|
|
matrix:
|
|
architecture: ["x86", "x64"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
architecture: ${{ matrix.architecture }}
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
- uses: messense/maturin-action@v1
|
|
with:
|
|
command: publish
|
|
target: ${{ matrix.architecture }}
|
|
args: -m python/Cargo.toml --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
publish_npm:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 14
|
|
registry-url: https://registry.npmjs.org
|
|
- run: rustup update
|
|
- run: cargo install wasm-pack
|
|
- run: npm install
|
|
working-directory: ./js
|
|
- run: npm run build
|
|
working-directory: ./js
|
|
- run: npm run release
|
|
working-directory: ./js
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
publish_python_doc:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
- run: python -m venv python/venv
|
|
- run: source python/venv/bin/activate && pip install --upgrade 'maturin~=0.12' sphinx
|
|
- run: source venv/bin/activate && maturin develop
|
|
working-directory: ./python
|
|
- run: source ../venv/bin/activate && sphinx-build -M doctest . build
|
|
working-directory: ./python/docs
|
|
- run: source ../venv/bin/activate && sphinx-build -M html . build
|
|
working-directory: ./python/docs
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: oxigraph/oxigraph.github.io
|
|
path: website
|
|
token: ${{ secrets.FULL_ACCESS_TOKEN }}
|
|
- run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
|
- run: |
|
|
rm -rf ./website/pyoxigraph/stable && mkdir -p ./website/pyoxigraph/stable && cp -r ./python/docs/build/html/* ./website/pyoxigraph/stable/
|
|
mkdir -p ./website/pyoxigraph/$RELEASE_VERSION && cp -r ./python/docs/build/html/* ./website/pyoxigraph/$RELEASE_VERSION/
|
|
- run: |
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git add .
|
|
git diff-index --quiet HEAD || git commit -m "Updates pyoxigraph documentation"
|
|
git push
|
|
working-directory: ./website
|
|
|
|
publish_homebrew:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: oxigraph/homebrew-oxigraph
|
|
token: ${{ secrets.FULL_ACCESS_TOKEN }}
|
|
- run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
|
- run: |
|
|
wget "https://github.com/oxigraph/oxigraph/archive/$RELEASE_VERSION.tar.gz"
|
|
SHA=`shasum -a 256 "$RELEASE_VERSION.tar.gz" | awk '{ print $1 }'`
|
|
rm "$RELEASE_VERSION.tar.gz"
|
|
sed -i "s/archive\/.*\.tar/archive\/$RELEASE_VERSION.tar/g" Formula/oxigraph.rb
|
|
sed -i "s/sha256 \".*\"/sha256 \"$SHA\"/g" Formula/oxigraph.rb
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git add .
|
|
git diff-index --quiet HEAD || git commit -m "Upgrades to $RELEASE_VERSION"
|
|
git push
|
|
|