diff --git a/.github/workflows/Crate-publishing.yml b/.github/workflows/Crate-publishing.yml index bcbd2cb1..6ef0d446 100644 --- a/.github/workflows/Crate-publishing.yml +++ b/.github/workflows/Crate-publishing.yml @@ -56,38 +56,27 @@ jobs: default: true - name: '🛠️ Add msbuild to PATH' - if: contains(matrix.config.name, 'win') + if: contains(matrix.config.os, 'win') uses: microsoft/setup-msbuild@v1.0.3 with: vs-version: '16.5' - name: '🛠️ Win build dependencies' - if: contains(matrix.config.name, 'win') + if: contains(matrix.config.os, 'win') shell: bash run: | choco install ninja cmake - name: '🚧 Cargo test' + if: "!startsWith(github.ref, 'refs/tags')" + env: + QNICORN_VERSION: dev run: | - cd bindings/rust && cargo test - - # - name: '📤 Upload artifact' - # uses: actions/upload-artifact@v2 - # with: - # path: ${{ github.workspace }}/bindings/python/dist/* - - # publish: - # needs: [build] - # runs-on: ubuntu-latest - # if: startsWith(github.ref, 'refs/tags') - # steps: - # - uses: actions/download-artifact@v2 - # with: - # name: artifact - # path: dist - - # - name: '📦 Publish distribution to PyPI' - # uses: pypa/gh-action-pypi-publish@master - # with: - # user: __token__ - # password: ${{ secrets.pypi_pass }} + cd bindings/rust && cargo test + + - name: '📦 Cargo Publish' + if: startsWith(github.ref, 'refs/tags') && contains(matrix.config.os, 'ubuntu') + env: + TOKEN: ${{ secrets.cratesio_pass }} + run: | + cd bindings/rust && cargo login $TOKEN && cargo test && cargo publish \ No newline at end of file