Skip to content

Merge pull request #119 from nxt-dev/dev #1

Merge pull request #119 from nxt-dev/dev

Merge pull request #119 from nxt-dev/dev #1

Workflow file for this run

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_test_upload