Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mjo22 authored Mar 23, 2024
1 parent b92c948 commit 86c848a
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,31 @@ on:
workflow_dispatch:

jobs:
build:
deploy:
name: Deploy
runs-on: ubuntu-latest

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing on PyPi
# see https://docs.pypi.org/trusted-publishers/
id-token: write
# This permission allows writing releases
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies

- name: 👷 Build
run: |
python -m pip install -U pip
python -m pip install -U pkginfo build twine
- name: Build the distribution
run: python -m build .
- name: Check the distribution
run: python -m twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
path: dist/*
python -m pip install build
python -m build
publish:
environment:
name: pypi
url: https://pypi.org/p/cryojax
permissions:
id-token: write
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/[email protected]
- name: 🚢 Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 86c848a

Please sign in to comment.