Skip to content

Set up alternative publishing workflow for repositories #3

Set up alternative publishing workflow for repositories

Set up alternative publishing workflow for repositories #3

Workflow file for this run

# copied from https://github.com/marketplace/actions/install-poetry-action
name: publish (alternative)
on:
push:
tags: ["v*"]
release:
types: ["published"]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install poetry dynamic versioning plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"
- name: Register test pypi
run: poetry config repositories.test-pypi https://test.pypi.org/legacy/
- if: github.event_name = 'release'

Check failure on line 38 in .github/workflows/publish_test.yaml

View workflow run for this annotation

GitHub Actions / publish (alternative)

Invalid workflow file

The workflow is not valid. .github/workflows/publish_test.yaml (Line: 38, Col: 13): Unexpected symbol: '='. Located at position 19 within expression: github.event_name = 'release'
name: Build & publish ixmp4 to pypi
run: poetry publish --build
- if: github.event_name != 'release'
name: Build & publish ixmp4 to testpypi
run: poetry publish --build -r test-pypi