Skip to content

Commit

Permalink
Set up alternative publishing workflow for repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
phackstock committed Aug 10, 2023
1 parent 37b1027 commit 298b88b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/publish_test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# copied from https://github.com/marketplace/actions/install-poetry-action
name: publish (alternative)

on: pull_request
on:
push:
tags: ["v*"]
release:
types: ["published"]
workflow_dispatch:

jobs:
publish:
Expand All @@ -28,6 +33,13 @@ jobs:
installer-parallel: true
- name: Install poetry dynamic versioning plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"
- name: Build & publish ixmp4
run: poetry publish --build --dry-run
- name: Register test pypi
run: poetry config repositories.test-pypi https://test.pypi.org/legacy/
- if: 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


0 comments on commit 298b88b

Please sign in to comment.