forked from nxt-dev/nxt
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.87 KB
/
release.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: Release
on:
push:
branches: [release]
workflow_dispatch:
branches: [release]
workflow_call:
inputs:
QT_DEPENDENCIES:
description: 'Set to true to install Qt dependencies (Linux)'
required: false
default: 'false'
type: string
jobs:
run-tests:
uses: nxt-dev/nxt/.github/workflows/unittests.yml@release
with:
QT_DEPENDENCIES: ${{ inputs.QT_DEPENDENCIES }}
build-and-deploy-pypi:
needs: [run-tests]
runs-on: ubuntu-latest
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout build graph (if needed)
if: github.repository != 'nxt-dev/nxt'
uses: actions/checkout@v4
with:
repository: nxt-dev/nxt
ref: release
path: nxt
sparse-checkout: build
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Ensure PIP
run: python -m ensurepip --upgrade
- name: Install nxt-core (if needed)
if: github.repository != 'nxt-dev/nxt'
run: |
pip install git+https://github.com/nxt-dev/nxt.git@release
- name: Install this package and dependencies
run: |
pip install twine
pip install .
- name: Set NXT_FILE_ROOTS (if needed)
if: github.repository != 'nxt-dev/nxt'
env:
# Thepackaging graph expects nxt to be cloned next to nxt_editor
# this is not possible in GHA so we abuse the file fall backs to
# trick it into working
NXT_FILE_ROOTS: '../docs/api_docs'
run: echo "NXT_FILE_ROOTS=$NXT_FILE_ROOTS" >> $GITHUB_ENV
- name: Build package and upload
run: |
python -m nxt.cli -vv exec build/packaging.nxt -s /make_and_upload