This repository has been archived on 2026-05-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
foreign-thon-old/.gitea/workflows/publish.yml
2026-05-15 19:18:44 -05:00

52 lines
1.3 KiB
YAML

name: Publish
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build tools
run: pip install build twine
- name: Build core package
run: python -m build packages/foreignthon
- name: Build Spanish pack
run: python -m build packages/langs/es
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload packages/foreignthon/dist/*
twine upload packages/langs/es/dist/*
- name: Create Gitea release
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${{ github.ref_name }}\",
\"name\": \"${{ github.ref_name }}\",
\"body\": \"Release ${{ github.ref_name }}\",
\"draft\": false,
\"prerelease\": false
}" \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"