Skip to content

Generate Artifacts #105

Generate Artifacts

Generate Artifacts #105

Workflow file for this run

name: Generate Artifacts
on:
release:
types:
- published
jobs:
build_binary:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.13"
- run: python3 -m pip install build
- run: python3 -m build client
- uses: actions/upload-artifact@v2
with:
name: build_binary
path: client/dist
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build_binary]
name: Create release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/OSCR-django-client
permissions:
contents: write
id-token: write
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: build_binary
path: dist
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1