-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (55 loc) · 1.96 KB
/
main-pypi-publish.yml
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
name: Publish release pylzy package
on:
# push:
# branches:
# - master
# paths:
# - pylzy/version # TODO: replace with tag change?
workflow_dispatch:
jobs:
#### <- TODO: replace with reusable workflow in future: .github/workflows/reusable/acceptance-tests.yml
acceptance-test:
# runs-on: self-hosted
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: "Chown for checkout"
run: sudo chown -R $USER:$USER /home/ubuntu/actions-runner/_work/lzy/
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Copy secret key'
env:
PRIVATE_KEY: ${{ secrets.TESTS_PRIVATE_SSH_KEY }}
run: touch /tmp/test-private.pem && echo "$PRIVATE_KEY" > /tmp/test-private.pem
- name: 'AC test'
timeout-minutes: 45
run: mvn install -Dtest=KuberRunTest -DfailIfNoTests=false
- uses: scacap/action-surefire-report@v1
if: always()
#### <- TODO: replace with reusable workflow in future: .github/workflows/reusable/acceptance-tests.yml
#### <- TODO: replace with reusable workflow in future: .github/workflows/reusable/build-pypi-publish.yml
build-and-publish:
needs: acceptance-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: cachix/install-nix-action@v15
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: cd pylzy
- name: Build package
run: ./scripts/clean.sh && ./scripts/build.sh
- name: Publish package
run: ./scripts/publish.sh
env:
TWINE_PASSWORD: ${{ secrets.PYPI_API_RELEASE_TOKEN }}
- name: Clean up
run: ./scripts/clean.sh && cd ..
#### <- TODO: replace with reusable workflow in future: .github/workflows/reusable/build-pypi-publish.yml