diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..711ab005d --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,17 @@ +name: "Build simpleflow" + +on: + release: + types: + - created + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: python setup.py sdist bdist_wheel + - uses: actions/upload-artifact@v3 + with: + name: simpleflow + path: dist diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml new file mode 100644 index 000000000..ef5240c97 --- /dev/null +++ b/.github/workflows/test-release.yaml @@ -0,0 +1,35 @@ +name: "Publish release to TestPyPI" + +on: + workflow_run: + workflows: + - build + types: + - completed + branches: + - main + +jobs: + publish-testpypi: + name: Upload release to TestPyPI + if: ${{ github.event.workflow_run.conclusion == 'success' }} +# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + environment: + name: test-release + url: https://test.pypi.org/p/simpleflow + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v3 + with: + name: simpleflow + + - name: Publish package distributions to TestPyPI + uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e + with: + repository-url: https://test.pypi.org/legacy/ + verbose: true + print-hash: true