test pypi publishing #29
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: Iroha 2 main branch workflow | |
on: | |
push: | |
branches: [main, i2/ci/pypi-publish] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.8 ] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install correct rust version | |
run: rustup install nightly-2024-09-09 && rustup component add rust-src --toolchain nightly-2024-09-09 | |
- name: Set toolchain | |
run: rustup default nightly-2024-09-09 | |
- name: Maturin build | |
run: | | |
pip install maturin | |
maturin build | |
mkdir dist | |
cp target/wheels/* dist/ | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish-to-pypi: | |
name: >- | |
Publish Python 🐍 distribution 📦 to PyPI | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/project/iroha2/ | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |