-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: time to give up on not repeating myself (#9)
- Loading branch information
Showing
1 changed file
with
3 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 "[email protected]" | ||
# - run: python3 -m pip install --user python-semantic-release | ||
# - run: python -m semantic_release version -v DEBUG -D commit_author="github-actions <[email protected]>" | ||
|
||
- 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 * |