Monthly Automated Tag #8
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: Monthly Automated Tag | |
on: | |
schedule: | |
- cron: '20 2 1 * *' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install .[test] | |
- name: Test with pytest | |
run: | | |
pytest | |
monthly_tag: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.NDEMO_PAT_TOKEN }} | |
- name: Create and push the tag | |
run: | | |
python utils/mathlab_versioning.py set --only-date "post$(date +%y%m)" | |
cat pydmd/meta.py | |
VERS=$(python utils/mathlab_versioning.py get) | |
git config --global user.name 'Monthly Tag bot' | |
git config --global user.email '[email protected]' | |
git add pydmd/meta.py | |
git commit -m "monthly version $VERS" | |
git tag -a "v$VERS" -m "Monthly version $VERS" | |
git push origin "v$VERS" |