diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3bbcba0..3312ffa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,9 @@ name: CI on: push: - create: + branches: [ main ] + pull_request: + branches: [ main ] env: CARGO_TERM_COLOR: always @@ -24,7 +26,6 @@ jobs: # anyway so there's no point to run tests a third time. BuildLinux: runs-on: ubuntu-latest - if: "!(github.ref == 'refs/heads/main' && github.event_name == 'push')" steps: - uses: actions/checkout@v2 @@ -62,7 +63,6 @@ jobs: BuildWindows: runs-on: windows-latest - if: "!(github.ref == 'refs/heads/main' && github.event_name == 'push')" steps: - uses: actions/checkout@v2 @@ -92,7 +92,6 @@ jobs: BuildMacOS: runs-on: macos-latest - if: "!(github.ref == 'refs/heads/main' && github.event_name == 'push')" steps: - uses: actions/checkout@v2 @@ -113,43 +112,3 @@ jobs: name: wheels path: dist retention-days: 2 - - # This only runs when we push to main. Instead of running tests, we - # bump the version and make a tag. - BumpVersion: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - # - run: git config user.name "GitHub actions" - # - run: git config user.email "github-actions@users.noreply.github.com" - # - run: python3 -m pip install --user python-semantic-release - # - run: python -m semantic_release version -v DEBUG -D commit_author="github-actions " - - - name: Python Semantic Release - uses: relekang/python-semantic-release@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - run: git push - - # We've got a new version! `Build` will run and after it finishes we - # can publish! - Publish: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: [ BuildLinux, BuildWindows, BuildMacOS ] - steps: - - uses: actions/download-artifact@v2 - with: - name: wheels - - name: Publish to PyPI - uses: messense/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - with: - command: upload - args: --repository-url=https://test.pypi.org/legacy/ --username=msalib --skip-existing *