-
Notifications
You must be signed in to change notification settings - Fork 22
105 lines (100 loc) · 3.14 KB
/
release.yaml
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
104
105
name: Release
# on:
# push:
# tags:
# - "v?.?"
# branches:
# - master
on: [push]
jobs:
build_docs:
# # https://github.com/orgs/community/discussions/26238
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# needs: "Commit push"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Install task
run: curl -sL https://taskfile.dev/install.sh | sh
- name: Build documentation
run: ./bin/task build_docs
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/docs
# deploy_docs:
# # if: ${{ github.event.workflow_run.conclusion == 'success' }}
# needs: build_docs
# runs-on: ubuntu-latest
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# permissions:
# pages: write
# id-token: write
# steps:
# - name: Deploy to GitHub Pages
# uses: actions/deploy-pages@v4
build_exe:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: "Commit push"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Install pyinstaller
# Pyinstaller restricts the maximum Python version to use, so don't add it to pyproject.toml to avoid the
# the same restriction for the package.
run: poetry run pip install pyinstaller
- name: Build executable
run: poetry run pyinstaller --name pyzkaccess --onefile pyzkaccess/main.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pyzkaccess.exe
path: dist/pyzkaccess.exe
if-no-files-found: error
testpypi_publish:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: "Commit push"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- run: poetry config repositories.testpypi https://test.pypi.org/legacy/
- name: Publish package
run: poetry publish -r testpypi --build
env:
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TESTPYPI_TOKEN }}
# pypi_publish:
# # if: ${{ github.event.workflow_run.conclusion == 'success' }}
# runs-on: ubuntu-latest
# needs: test_pypi_publish
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - uses: abatilo/actions-poetry@v2
# - name: Install dependencies
# run: poetry install
# - name: Publish package
# run: poetry publish --build
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}