Skip to content

Commit

Permalink
ci: Setup auto-release
Browse files Browse the repository at this point in the history
  • Loading branch information
uadnan committed Oct 7, 2024
1 parent 6de2f27 commit 9df4f26
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 29 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: torchcast

on:
push:
branches:
- main
pull_request:

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
py-version: [ '3.8', '3.9', '3.10' ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: 'pip'
cache-dependency-path: pyproject.toml
python-version: ${{ matrix.py-version }}

- name: Install torchcast
run: pip install .[tests]

- name: Run tests
run: python3 -m unittest

release:
needs: test
concurrency:
group: release
runs-on: ubuntu-latest

steps:
- name: Install Dependencies
run: |
pip install --upgrade python-semantic-release
- name: Release
run: |
git clone https://${{ secrets.STRONGIO_MACHINE_PAT }}:@github.com/strongio/torchcast
cd torchcast
semantic-release version --push --changelog --vcs-release --commit
env:
GH_TOKEN: ${{ secrets.STRONGIO_MACHINE_PAT }}
29 changes: 0 additions & 29 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 9df4f26

Please sign in to comment.