Skip to content

chore(deps): lock file maintenance (#433) #38

chore(deps): lock file maintenance (#433)

chore(deps): lock file maintenance (#433) #38

Workflow file for this run

name: Release
jobs:
pages-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: pdm-project/setup-pdm@c050bdcb2405837648035b6678c75609d53a749f # v4
with:
cache: true
python-version: "3.12"
- id: pages
name: Setup pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
- run: env | sort
- run: PDM_NO_EDITABLE=true make dev-doc
- run: CI_PAGES_URL=${{ steps.pages.outputs.base_url }} make doc
- name: Generate release notes
run: make release-notes > release-notes.md
- name: Upload release notes
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: release-notes
path: release-notes.md
- name: Upload pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: public
release-publish:
needs: pages-build
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- name: Download release notes
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: release-notes
- id: prerelease
name: Determine prerelease
run: |
if [[ "${{ github.ref }}" =~ (a|b|rc)(0|[1-9][0-9]*)?$ ]]; then
echo "is_prerelease=true" > $GITHUB_OUTPUT
else
echo "is_prerelease=false" > $GITHUB_OUTPUT
fi
- name: Create GitHub release
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
body_path: release-notes.md
prerelease: ${{ steps.prerelease.outputs.is_prerelease }}
container-publish:
needs: release-publish
permissions:
packages: write
runs-on: ubuntu-22.04
steps:
- uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
- name: Build and push dev container
env:
SOURCE_DATE_EPOCH: 0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
build-args: |
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: true
tags: |
ghcr.io/${{ github.repository }}/dev:py${{ matrix.python-version }}
ghcr.io/${{ github.repository }}/dev:py${{ matrix.python-version }}-${{ github.ref_name }}
target: dev
- name: Build and push prod container
env:
SOURCE_DATE_EPOCH: 0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
PDM_BUILD_SCM_VERSION=${{ github.ref_name }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/dev-cache:py${{ matrix.python-version }}
file: .devcontainer/Dockerfile
provenance: false
push: true
tags: |
ghcr.io/${{ github.repository }}:py${{ matrix.python-version }}
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:
needs: release-publish
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: pdm-project/setup-pdm@c050bdcb2405837648035b6678c75609d53a749f # v4
with:
cache: true
python-version: "3.12"
- run: env | sort
- env:
PDM_PUBLISH_PASSWORD: ${{ secrets.PDM_PUBLISH_PASSWORD }}
PDM_PUBLISH_USERNAME: ${{ vars.PDM_PUBLISH_USERNAME || '__token__' }}
run: make publish
pages:
needs: release-publish
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
on:
push:
tags:
- v?[0-9]+.[0-9]+.[0-9]+
- v?[0-9]+.[0-9]+.[0-9]+-?a[0-9]*
- v?[0-9]+.[0-9]+.[0-9]+-?b[0-9]*
- v?[0-9]+.[0-9]+.[0-9]+-?rc[0-9]*