Updating changelog to next version: 0.5.4 #30
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: Deploy | |
on: | |
push: | |
branches: [main] | |
jobs: | |
last-minute-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[develop] | |
- run: python -m pytest | |
build-packages: | |
name: Build, sign, and release packages on github | |
runs-on: ubuntu-latest | |
needs: [last-minute-test] | |
permissions: | |
contents: write # IMPORTANT: mandatory for making GitHub Releases | |
id-token: write # IMPORTANT: mandatory for sigstore | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: set up python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install . montepy[build] | |
- name: Get Version | |
id: get_version | |
run: echo "version=`python -m setuptools_scm`" >> $GITHUB_OUTPUT | |
- name: Verify that this is a non-dev release | |
run: .github/scripts/check_version.sh ${{ steps.get_version.outputs.version }} | |
- run: python -m build . | |
- name: Sign the dists with Sigstore | |
uses: sigstore/[email protected] | |
with: | |
inputs: >- | |
./dist/*.tar.gz | |
./dist/*.whl | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: v${{ steps.get_version.outputs.version }} | |
name: Release ${{ steps.get_version.outputs.version }} | |
draft: true | |
- run: >- | |
gh release upload | |
'v${{ steps.get_version.outputs.version }}' dist/** | |
--repo '${{ github.repository }}' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: | | |
dist/*.tar.gz | |
dist/*.whl | |
deploy-test-pypi: | |
environment: | |
name: test-pypi | |
url: https://test.pypi.org/p/montepy # Replace <package-name> with your PyPI project name | |
needs: [build-packages] | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
deploy-pypi: | |
environment: | |
name: pypi | |
url: https://pypi.org/p/montepy # Replace <package-name> with your PyPI project name | |
needs: [deploy-test-pypi, build-packages] | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |