chore(deps): update dependency torch to v2.2.1 (#46) #102
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
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
- uses: DeterminateSystems/magic-nix-cache-action@v3 | |
- run: nix flake check | |
release: | |
runs-on: ubuntu-latest | |
needs: test | |
if: ${{ github.repository_owner == 'wi2trier' && github.event_name == 'push' }} | |
environment: | |
name: release | |
url: https://github.com/wi2trier/cbrkit/releases/tag/${{ steps.semanticrelease.outputs.git-tag }} | |
permissions: | |
contents: write | |
outputs: | |
version: ${{ steps.semanticrelease.outputs.version }} | |
released: ${{ steps.semanticrelease.outputs.released }} | |
git-head: ${{ steps.semanticrelease.outputs.git-head }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
- uses: DeterminateSystems/magic-nix-cache-action@v3 | |
- run: nix profile install .#releaseEnv | |
- uses: cihelper/action-semanticrelease-poetry@v1 | |
id: semanticrelease | |
- uses: actions/upload-artifact@v4 | |
if: ${{ steps.semanticrelease.outputs.released == 'true' }} | |
with: | |
name: poetry-build | |
path: ./dist | |
deploy-docker: | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.released == 'true' }} | |
permissions: | |
contents: read | |
packages: write | |
environment: | |
name: release | |
url: https://ghcr.io/wi2trier/cbrkit | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.release.outputs.git-head }} | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
with: | |
extra-conf: | | |
extra-platforms = aarch64-linux | |
- uses: DeterminateSystems/magic-nix-cache-action@v3 | |
- run: nix run .#dockerManifest --impure | |
env: | |
VERSION: ${{ needs.release.outputs.version }} | |
GH_TOKEN: ${{ github.token }} | |
deploy-pypi: | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.released == 'true' }} | |
permissions: | |
id-token: write | |
environment: | |
name: release | |
url: https://pypi.org/project/cbrkit/${{needs.release.outputs.version}}/ | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: poetry-build | |
path: ./dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
build-docs: | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.released == 'true' }} | |
permissions: | |
contents: read | |
pages: read | |
environment: github-pages | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.release.outputs.git-head }} | |
- uses: actions/configure-pages@v4 | |
- uses: DeterminateSystems/nix-installer-action@v9 | |
- uses: DeterminateSystems/magic-nix-cache-action@v3 | |
- run: nix build .#docs | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./result | |
deploy-docs: | |
runs-on: ubuntu-latest | |
needs: build-docs | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/deploy-pages@v4 | |
id: deploy |