Skip to content

Commit 1fb167c

Browse files
committed
Update workflow
1 parent 4e11bf8 commit 1fb167c

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,36 @@ jobs:
5454
python-version: ${{ matrix.python-version }}
5555
- name: Install dependencies
5656
run: make install
57-
- name: test version
58-
run: make test-version
57+
- name: check if we can publish
58+
id: check
59+
run: echo ::set-output name=release::$(make test-version)
5960
- name: build python bundle
61+
if: steps.check.outputs.release == 'yes'
6062
run: "make bundle${{ matrix.python-version }}"
6163
- name: release to pypi
64+
if: steps.check.outputs.release == 'yes'
6265
run: make release-pypi
66+
67+
github:
68+
runs-on: ubuntu-latest
69+
env:
70+
PYTHON_ENV: ci
71+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
72+
GITHUB_TOKEN: ${{ secrets.QMBOT_GITHUB_TOKEN }}
73+
needs: release
74+
if: github.ref == 'refs/heads/master'
75+
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Set up Python ${{ matrix.python-version }}
79+
uses: actions/setup-python@v2
80+
with:
81+
python-version: 3.8
82+
- name: Install dependencies
83+
run: make install
84+
- name: check if we can publish
85+
id: check
86+
run: echo ::set-output name=release::$(make test-version)
6387
- name: release to github
64-
if: matrix.python-version == '3.8'
88+
if: steps.check.outputs.release == 'yes'
6589
run: make release-github

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test-lint: ## run linters
4646

4747

4848
test-version: ## validate version
49-
@agilekit git validate
49+
@agilekit git validate --yes-no
5050

5151

5252
bundle3.6: ## build python 3.6 bundle

dev/agile.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)