pymastodon/.gitea/workflows/run.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

2024-04-30 10:39:54 +02:00
name: Build and Release
run-name: ${{ gitea.actor }}
on:
push:
branches:
- main
jobs:
run-terraform:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install pipenv
run: pip install pipenv
- name: Run pipenv install
run: pipenv install --dev
2024-04-30 11:05:37 +02:00
# Disabling until we can mock mastodon communication
# - name: Run Pytest
# run: pipenv run pytest
2024-04-30 10:41:39 +02:00
- name: Bump Version
2024-04-30 11:07:19 +02:00
run: |
git config --global user.name 'Gitea Actions'
git config --global user.email 'gitea@gitea.moerks.dk'
pipenv run bumpver update --minor
2024-04-30 11:15:21 +02:00
- name: Build Package
2024-04-30 11:25:03 +02:00
run: |
2024-04-30 12:31:34 +02:00
pipenv requirements --exclude-markers > requirements.txt
2024-04-30 11:25:03 +02:00
pipenv run python -m build
2024-04-30 11:15:21 +02:00
- name: Publish Package
run: |
export TWINE_USERNAME=${{ secrets.TWINE_USER }}
export TWINE_PASSWORD=${{ secrets.TWINE_PASS }}
export TWINE_REPOSITORY_URL=${{ secrets.TWINE_REPO }}
pipenv run twine upload dist/*
2024-04-30 10:39:54 +02:00