From 51290db5b36de36ae2ec444783e08bad99cb2a42 Mon Sep 17 00:00:00 2001 From: mrbuche Date: Mon, 9 Jan 2023 23:10:52 -0700 Subject: [PATCH 1/4] test pypi action --- .github/workflows/python.yml | 15 ++++++++++++++- Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9856bea2..a2a40ac2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,11 +1,14 @@ name: Python on: push: - branches: [ "main" ] + branches: [ "dev" ] pull_request: branches: [ "main" ] + release: + types: [ published ] jobs: test: + if: github.event_name != 'release' runs-on: ubuntu-latest steps: - name: checkout @@ -15,3 +18,13 @@ jobs: pip install maturin maturin build --features python pip install target/wheels/*.whl + publish: + if: github.event_name == 'release' + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: publish + run: | + pip install maturin + maturin publish -F python -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index d4ab2dcc..59382b07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polymers" -version = "0.0.5" +version = "0.0.5a" edition = "2021" description = "Polymers Modeling Library" license = "BSD-3-Clause" From 6255d66f8d7164b956a2fb3ed19cd5c534c8d78d Mon Sep 17 00:00:00 2001 From: mrbuche Date: Mon, 9 Jan 2023 23:11:59 -0700 Subject: [PATCH 2/4] test pypi action --- .github/workflows/python.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a2a40ac2..cb8fb54e 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -19,7 +19,7 @@ jobs: maturin build --features python pip install target/wheels/*.whl publish: - if: github.event_name == 'release' + # if: github.event_name == 'release' runs-on: ubuntu-latest steps: - name: checkout diff --git a/Cargo.toml b/Cargo.toml index 59382b07..09d539fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polymers" -version = "0.0.5a" +version = "0.0.51" edition = "2021" description = "Polymers Modeling Library" license = "BSD-3-Clause" From b165936dd3f4028ad8fa4ef919b785f8eae4a9b7 Mon Sep 17 00:00:00 2001 From: mrbuche Date: Mon, 9 Jan 2023 23:16:57 -0700 Subject: [PATCH 3/4] test pypi action --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index cb8fb54e..9a238d42 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -27,4 +27,4 @@ jobs: - name: publish run: | pip install maturin - maturin publish -F python -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_TOKEN }} + maturin publish -F python -u __token__ -p ${{ secrets.PYPI_TOKEN }} From b24292b4c3ef51d93ff9e4b8b7e40845e603e225 Mon Sep 17 00:00:00 2001 From: mrbuche Date: Mon, 9 Jan 2023 23:19:30 -0700 Subject: [PATCH 4/4] test pypi action --- .github/workflows/python.yml | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9a238d42..3d1d9463 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,7 +1,7 @@ name: Python on: push: - branches: [ "dev" ] + branches: [ "main" ] pull_request: branches: [ "main" ] release: @@ -19,7 +19,7 @@ jobs: maturin build --features python pip install target/wheels/*.whl publish: - # if: github.event_name == 'release' + if: github.event_name == 'release' runs-on: ubuntu-latest steps: - name: checkout diff --git a/Cargo.toml b/Cargo.toml index 09d539fc..d4ab2dcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polymers" -version = "0.0.51" +version = "0.0.5" edition = "2021" description = "Polymers Modeling Library" license = "BSD-3-Clause"