Skip to content

v3.0.2

v3.0.2 #10

Workflow file for this run

name: Publish To PyPI
on:
push:
tags:
- 'v*'
jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set environnment package version from tag
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV # extract "1.2.3" from refs/tags/v1.2.3
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install dependencies
run: pip install build twine
- name: Build wheel
run: python -m build
- name: Publish distribution to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload --repository pypi dist/*
- name: Invoke workflow in systemuser-image
uses: benc-uk/workflow-dispatch@v1
with:
workflow: SWAN CI/CD pipeline
ref: master
repo: swan-cern/systemuser-image
token: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
inputs: '{ "package": "sparkmonitor", "version": "${{env.PACKAGE_VERSION}}" }'