add workflows #11
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
name: Test and update master | |
on: | |
push: | |
branches: ["develop"] | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and test | |
run: | | |
pip install --upgrade pip | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
make install | |
make test | |
- name: Push to master if tests pass | |
if: success() | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: master | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: python -c "import skypy; print(skypy.__version__)" | |
release_name: python -c "import skypy; print(skypy.__version__)" | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |