Skip to content

Update workflows #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create Release
on:
release:
types:
- created
push:
branches:
- main
jobs:
build:
name: Create Release
Expand All @@ -20,8 +20,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: 0.0.${{ github.run_number }}
release_name: Release 0.0.${{ github.run_number }}
tag_name: v0.0.${{ github.run_number }}
release_name: Release v0.0.${{ github.run_number }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
name: Publish a new release

on:
push:
branches:
- main

workflow_run:
workflows: ["create-release"]
branches: [main]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -31,11 +32,6 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
Expand Down