|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push_server_to_docker_registry:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: docker/metadata-action@v3
|
|
|
|
id: docker_meta
|
|
|
|
with:
|
|
|
|
images: oxigraph/oxigraph
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- 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 }}
|
|
|
|
push_wikibase_to_docker_registry:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: docker/metadata-action@v3
|
|
|
|
id: docker_meta
|
|
|
|
with:
|
|
|
|
images: oxigraph/oxigraph-wikibase
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: wikibase/Dockerfile
|
|
|
|
pull: true
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
|
|
|
publish_lib_crate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo login $CRATES_IO_TOKEN
|
|
|
|
env:
|
|
|
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
|
|
- run: cargo publish
|
|
|
|
working-directory: ./server
|
|
|
|
publish_wikibase_crate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish_lib_crate
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo login $CRATES_IO_TOKEN
|
|
|
|
env:
|
|
|
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
|
|
- run: cargo publish
|
|
|
|
working-directory: ./wikibase
|
|
|
|
publish_pypi_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish_lib_crate
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: sed -i 's/path="..\/lib", //g' python/Cargo.toml
|
|
|
|
- run: docker run --rm -v $(pwd):/io konstin2/maturin:v0.9.4 publish -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
working-directory: ./python
|
|
|
|
publish_pypi_mac_windows:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
needs: publish_lib_crate
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ macos-latest, windows-latest ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.6
|
|
|
|
- run: pip install 'maturin>=0.9.2,<0.10'
|
|
|
|
- run: maturin publish --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
working-directory: ./python
|
|
|
|
publish_python_doc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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 pip 'maturin>=0.9.2,<0.10' 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
|