publish #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
# Activate the workflow every 15 days at 23:30 UTC = for Paris 00:30 (summer) or 01:30 (winter) | |
schedule: | |
# * is a special character in YAML so you have to quote the string | |
- cron: '30 23 */15 * *' | |
# Permit manual trigger | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Manual' | |
required: false | |
default: '' | |
dry_publish: | |
description: 'Dry publish (no upload)' | |
type: boolean | |
required: false | |
default: false | |
jobs: | |
call-python-macos: | |
uses: ./.github/workflows/publish_python_macos.yml | |
secrets: inherit | |
call-python-windows: | |
uses: ./.github/workflows/publish_python_windows.yml | |
secrets: inherit | |
call-python-ubuntu: | |
uses: ./.github/workflows/publish_python_ubuntu.yml | |
secrets: inherit | |
call-r-macos: | |
uses: ./.github/workflows/publish_r_macos.yml | |
secrets: inherit | |
call-r-windows: | |
uses: ./.github/workflows/publish_r_windows.yml | |
secrets: inherit | |
call-r-ubuntu: | |
uses: ./.github/workflows/publish_r_ubuntu.yml | |
secrets: inherit | |
call-python-publish: | |
needs: [call-python-macos, call-python-windows, call-python-ubuntu, call-r-macos, call-r-windows, call-r-ubuntu] | |
if: ${{ (inputs.dry_publish == false) && (github.event_name != 'schedule') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: fabien-ors/pypi-publish-action@v2 | |
with: | |
repo: pypi | |
username: __token__ | |
password: ${{secrets.TWINE_PYPI_PWD}} | |
pattern: "*python-package-*" | |
# Delete the artifacts (for freeing storage space under github) | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: "*python-package*" | |
call-r-publish: | |
needs: [call-python-macos, call-python-windows, call-python-ubuntu, call-r-macos, call-r-windows, call-r-ubuntu] | |
if: ${{ (inputs.dry_publish == false) && (github.event_name != 'schedule') }} | |
# Only ubuntu can upload to CRAN easily (ssh) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: fabien-ors/cran-publish-action@v4 | |
with: | |
host: ${{secrets.CG_HOST}} | |
username: ${{secrets.CG_USR}} | |
password: ${{secrets.CG_PWD}} | |
repo-path: "/var/www/html/cran" | |
pattern: "*r-package*" | |
# Delete the artifacts (for freeing storage space under github) | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: "*r-package*" |