v3.0.1 π #2
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 | |
env: | |
DEFAULT_PYTHON: "3.11" | |
jobs: | |
release: | |
name: Releasing to PyPi | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pypaperless | |
permissions: | |
contents: write | |
id-token: write # important for trusted publishing (pypi) | |
outputs: | |
version: ${{ steps.vars.outputs.tag }} | |
steps: | |
- name: β€΅οΈ Checkout code | |
uses: actions/[email protected] | |
- name: π§ Setup Poetry | |
run: pip install poetry | |
- name: π Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
cache: poetry | |
- name: π§ Install dependencies | |
run: poetry install --no-interaction | |
- name: π· Get repository tag | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: π§ Set project version from tag | |
run: poetry version --no-interaction "${{ steps.vars.outputs.tag }}" | |
- name: π Build package | |
run: poetry build --no-interaction | |
- name: β¬οΈ Publish to PyPi | |
uses: pypa/[email protected] | |
with: | |
print-hash: true | |
- name: π Sign published artifacts | |
uses: sigstore/[email protected] | |
with: | |
inputs: ./dist/*.tar.gz ./dist/*.whl | |
release-signing-artifacts: true |