v0.0.51 #39
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 | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
pages-build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
fetch-depth: 0 | |
- uses: pdm-project/setup-pdm@568ddd69406b30de1774ec0044b73ae06e716aa4 # v4 | |
with: | |
cache: true | |
python-version: '3.12' | |
version: 2.15.2 | |
- id: pages | |
name: Setup pages | |
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
- run: env | sort | |
- run: make dev-doc | |
- run: make doc | |
env: | |
CI_PAGES_URL: ${{ steps.pages.outputs.base_url }} | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
with: | |
path: public | |
pages: | |
needs: | |
- pages-build | |
permissions: | |
id-token: write | |
pages: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- id: deployment | |
name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |
container-publish: | |
permissions: | |
packages: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- run: docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
- run: | | |
docker context create builder | |
docker buildx create builder --name container --driver docker-container --use | |
docker buildx inspect --bootstrap --builder container | |
- run: | | |
docker buildx build . \ | |
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \ | |
--cache-from type=registry,ref=ghcr.io/${{ github.repository }}/dev-cache:py${{ matrix.python-version }} \ | |
--cache-to type=registry,ref=ghcr.io/${{ github.repository }}/dev-cache:py${{ matrix.python-version }},mode=max \ | |
--file .devcontainer/Dockerfile \ | |
--provenance false \ | |
--push \ | |
--tag ghcr.io/${{ github.repository }}/dev:py${{ matrix.python-version }} \ | |
--tag ghcr.io/${{ github.repository }}/dev:py${{ matrix.python-version }}-${{ github.ref_name }} \ | |
--target dev | |
- run: | | |
docker buildx build . \ | |
--build-arg PDM_BUILD_SCM_VERSION=${{ github.ref_name }} \ | |
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \ | |
--cache-from type=registry,ref=ghcr.io/${{ github.repository }}/dev-cache:py${{ matrix.python-version }} \ | |
--file .devcontainer/Dockerfile \ | |
--provenance false \ | |
--push \ | |
--tag ghcr.io/${{ github.repository }}:py${{ matrix.python-version }} \ | |
--tag ghcr.io/${{ github.repository }}:py${{ matrix.python-version }}-${{ github.ref_name }} \ | |
--target prod | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
package-publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- uses: pdm-project/setup-pdm@568ddd69406b30de1774ec0044b73ae06e716aa4 # v4 | |
with: | |
cache: true | |
python-version: '3.12' | |
version: 2.15.2 | |
- run: env | sort | |
- env: | |
PDM_PUBLISH_PASSWORD: ${{ secrets.PDM_PUBLISH_PASSWORD }} | |
PDM_PUBLISH_USERNAME: ${{ vars.PDM_PUBLISH_USERNAME || '__token__' }} | |
run: make publish |