Skip to content

Add CITATION.cff (#405) #32

Add CITATION.cff (#405)

Add CITATION.cff (#405) #32

Workflow file for this run

name: Publish
on:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
call-test-workflow:
uses: BlueBrain/eFEL/.github/workflows/test.yml@master
tag:
name: Bump version, push tag and make a release
needs: call-test-workflow
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Bump version and push tag
uses: anothrNick/[email protected]
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
- name: Get and store tag from 'Bump version and push tag' step
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: echo "TAG_NAME=${{ steps.tag.outputs.new_tag }}" >> $GITHUB_ENV
- name: Get and store tag from triggered tag push
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG_NAME }}
name: ${{ env.TAG_NAME }}
generate_release_notes: true
wheels:
needs: [call-test-workflow, tag]
uses: ./.github/workflows/build-wheels.yml
tarball:
name: Build tarball
runs-on: ubuntu-22.04
needs: [call-test-workflow, tag]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build a source tarball
run:
python setup.py sdist
- uses: actions/upload-artifact@v4
with:
name: tarball
path: dist
publish:
name: Release and Publish on PyPI
runs-on: ubuntu-22.04
needs: [call-test-workflow, tag, wheels, tarball]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Put artifacts into dist directory
run: |
mkdir -p dist
find artifacts -type f \( -iname \*.whl -o -iname \*.tar.gz \) -exec mv {} dist \;
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}