From 124c6e5333cc8f068690f7af54521111a36b57bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 25 Oct 2024 10:25:06 +0200 Subject: [PATCH] feat: automate release process - use uv to install dependencies for faster CI - add new workflow to build and publish releases on tags --- .github/workflows/release.yml | 21 +++++++++++++++++++++ .github/workflows/test.yml | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..743a212 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: test + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v3 + + - name: Build + run: uv build + + - name: Publish package + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'WeblateOrg/language-data' + run: uv publish --trusted-publishing always diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0fe2f07..6348c1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,10 @@ jobs: with: python-version: ${{ matrix.python-version }} + - uses: astral-sh/setup-uv@v3 + - name: Install - run: pip install -e .[tests] + run: uv pip install --system -e .[tests] - name: Test run: pytest