Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
svnv-svsv-jm committed Feb 18, 2024
1 parent e663462 commit 7549acf
Show file tree
Hide file tree
Showing 17 changed files with 543 additions and 203 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/test-deploy-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test and deploy

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
deploy:
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

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
- name: Build app
run: |
source venv/bin/activate
make app APPNAME="SVMoveEditor"
- 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 }}

- name: Upload App
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/SVMoveEditor.app
asset_name: SVMoveEditor.app.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}
59 changes: 59 additions & 0 deletions .github/workflows/test-deploy-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test and deploy

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
deploy:
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

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
- name: Build app
run: |
source venv/bin/activate
make app APPNAME="SVMoveEditor"
- 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 }}

- name: Upload App
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/SVMoveEditor.app
asset_name: SVMoveEditor.app.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}
31 changes: 10 additions & 21 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Test and deploy
name: Test and update master

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
branches: ["develop"]

jobs:
deploy:
Expand All @@ -13,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,12 +28,14 @@ jobs:
virtualenv venv
source venv/bin/activate
make install
make pytest
make test
- name: Build app
run: |
source venv/bin/activate
make app APPNAME="SVMoveEditor"
- 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
Expand All @@ -47,14 +47,3 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload App
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/SVMoveEditor.app
asset_name: SVMoveEditor.app.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}
Binary file modified docs/personal.xlsx
Binary file not shown.
Binary file modified docs/waza.xlsx
Binary file not shown.
Loading

0 comments on commit 7549acf

Please sign in to comment.