Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- v*
- v*.*.*
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
uses: actions/[email protected]
with:
name: poetry-build
path: dist

- name: Get changes
if: github.event_name == 'push'
Expand All @@ -65,19 +66,19 @@ jobs:
cat RELEASE.md

- name: Generate token
if: success() && github.event_name == 'push'
id: generate-token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create release
if: success()
if: success() && github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
token: ${{ steps.generate-token.outputs.token }}
body_path: RELEASE.md
draft: github.event_name == 'workflow_dispatch'
prerelease: ${{ contains(github.ref, '-') }}
files: dist/*

Expand All @@ -87,6 +88,15 @@ jobs:
needs: build

steps:
- name: Checkout
uses: actions/[email protected]

- name: Download build artifacts
uses: actions/[email protected]
with:
name: poetry-build
path: dist

- name: Set up Python
uses: actions/[email protected]

Expand All @@ -96,11 +106,6 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Download build artifacts
uses: actions/[email protected]
with:
name: poetry-build

- name: Publish to PyPI
if: success() && github.event_name == 'push'
run: |
Expand Down