File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : publish-pypi
2
+ run-name : Test, build and publish to pypi by @${{ github.actor }}
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*.*.*" # Trigger the workflow only on version tags
7
+ jobs :
8
+ # test:
9
+ # runs-on: ubuntu-latest
10
+
11
+ # steps:
12
+ # - name: Checkout
13
+ # uses: actions/checkout@v4
14
+ # - name: Setup Python
15
+ # uses: actions/setup-python@v5
16
+ # with:
17
+ # python-version-file: pyproject.toml
18
+ # - name: Install Task
19
+ # uses: arduino/setup-task@v2
20
+ # with:
21
+ # version: 3.x
22
+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
23
+ # - name: Install dependencies
24
+ # run: |
25
+ # pip install poetry
26
+ # poetry install
27
+ # - name: Run tests
28
+ # run: |
29
+ # export GACC_API_KEY=${{ secrets.GACC_API_KEY }}
30
+ # task test
31
+ build-and-publish :
32
+ runs-on : ubuntu-latest
33
+ # needs: test
34
+
35
+ steps :
36
+ - name : Checkout
37
+ uses : actions/checkout@v4
38
+ - name : Setup Python
39
+ uses : actions/setup-python@v5
40
+ with :
41
+ python-version-file : pyproject.toml
42
+ - name : Install Task
43
+ uses : arduino/setup-task@v2
44
+ with :
45
+ version : 3.x
46
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
47
+ - name : Install dependencies
48
+ run : |
49
+ pip install poetry
50
+ poetry install
51
+ - name : Build package
52
+ run : |
53
+ poetry build
54
+ - name: Publish package
55
+ env:
56
+ POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_KEY }}
57
+ run: |
58
+ poetry publish --no-interaction --username __token__ --password $POETRY_PYPI_TOKEN_PYPI
You can’t perform that action at this time.
0 commit comments