From 7aeddc7902ca67c482311c2e29f5a7e28412136e Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Thu, 29 Jan 2026 15:39:09 +0000 Subject: [PATCH] Add Gitea Actions workflow: release.yml --- .gitea/workflows/release.yml | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..a44ce3a --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,72 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'pip' + + - name: Install build + run: pip install build + + - name: Build package + run: python -m build + + - name: Create Release + uses: https://gitea.com/actions/release-action@main + with: + files: | + dist/** + !dist/*.txt + !dist/*.md + draft: false + prerelease: false + name: Release ${{ github.ref_name }} + body: | + ## Changes + + See [CHANGELOG.md](CHANGELOG.md) for details. + + ## Installation + + ```bash + pip install gitignore-cli-generator==${{ github.ref_name }} + ``` + + release-pypi: + runs-on: ubuntu-latest + needs: release + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'pip' + + - name: Install build + run: pip install build + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}