diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a94a4fa..d4d820f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -188,6 +188,6 @@ jobs: run: cargo test --verbose - if: "startsWith(github.ref, 'refs/tags/')" name: Publish Crate - run: cargo publish --token ${CRATES_TOKEN} + run: cargo publish --token ${CRATES_TOKEN} --allow-dirty env: CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/cargo-build-publish.yml b/.github/workflows/cargo-build-publish.yml new file mode 100644 index 0000000..3609493 --- /dev/null +++ b/.github/workflows/cargo-build-publish.yml @@ -0,0 +1,31 @@ +name: Test and Deploy +on: [workflow_dispatch] + +jobs: + cargo-build-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install latests stable Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + architecture: x64 + - name: Install deps + run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml + - run: | + cp README.md py-forust/README.md + cp LICENSE py-forust/LICENSE + - name: Update TOML + run: python scripts/remove-optional-deps.py + - name: Build test data + run: python scripts/make_resources.py + - name: Run tests + run: cargo test --verbose + - name: Publish Crate + run: cargo publish --token ${CRATES_TOKEN} --allow-dirty + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} \ No newline at end of file