chore(deps): lock file maintenance (#203) #36
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: | |
push: | |
branches: [main, beta] | |
jobs: | |
check: | |
uses: ./.github/workflows/check.yml | |
release: | |
if: ${{ github.repository_owner == 'wi2trier' }} | |
runs-on: ubuntu-latest | |
needs: check | |
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@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix profile install .#release-env | |
- uses: cihelper/action-semanticrelease-uv@v1 | |
id: semanticrelease | |
with: | |
uv-publish: false | |
- uses: actions/upload-artifact@v4 | |
if: ${{ steps.semanticrelease.outputs.released == 'true' }} | |
with: | |
name: uv-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@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
extra-platforms = aarch64-linux | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix run .#docker-manifest --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: uv-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@v5 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- 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 |