File: setup.yml

package info (click to toggle)
translate-toolkit 3.19.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,156 kB
  • sloc: python: 74,004; sh: 1,412; makefile: 185; xml: 48
file content (103 lines) | stat: -rw-r--r-- 3,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Distribution

on:
  push:
    branches-ignore:
    - renovate/**
    tags:
    - '*'
  pull_request:

permissions:
  contents: read

jobs:
  setup:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      with:
        persist-credentials: false
    - name: Set up Python
      uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
      with:
        python-version: 3.14
    - uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
      with:
        enable-cache: false
    - name: Install apt dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y libgettextpo-dev
    - name: Build pakcage
      run: uv build
    - name: Twine check
      run: uvx twine check dist/*
    - name: pydistcheck
      run: uvx pydistcheck --inspect dist/*
    - name: pyroma
      run: uvx pyroma dist/*.tar.gz
    - name: check-wheel-contents
      run: uvx check-wheel-contents dist/*.whl
    - name: check-manifest
      run: uvx check-manifest -v
    - name: Install test (source)
      run: |
        uv venv test-ttk-release-src
        . ./test-ttk-release-src/bin/activate
        uv pip install dist/translate_toolkit-*.tar.gz
        moz2po --help
        python ./test-ttk-release-src/lib/python*/site-packages/translate/lang/identify.py README.rst
    - name: Install test (wheel)
      run: |
        uv venv test-ttk-release-whl
        . ./test-ttk-release-whl/bin/activate
        uv pip install dist/translate_toolkit*.whl
        moz2po --help
        python ./test-ttk-release-whl/lib/python*/site-packages/translate/lang/identify.py README.rst
    - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
      with:
        name: setup
    - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
      with:
        path: ./dist/*

  pypi-publish:
    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
    needs:
    - setup
    runs-on: ubuntu-24.04
    permissions:
      # this permission is mandatory for trusted publishing
      id-token: write
    steps:
    - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
      with:
        # unpacks default artifact into dist/
        # if `name: artifact` is omitted, the action will create extra parent dir
        name: artifact
        path: dist

    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

  github-publish:
    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
    needs:
    - setup
    runs-on: ubuntu-24.04
    permissions:
      # this permission is mandatory for creating a release
      contents: write
    steps:
    - uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
      with:
        # unpacks default artifact into dist/
        # if `name: artifact` is omitted, the action will create extra parent dir
        name: artifact
        path: dist
    - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
      with:
        artifacts: dist/*