Skip to content

Commit

Permalink
fix: release in a separate GH environment
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Apr 6, 2021
1 parent d7e4e09 commit df53884
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,29 @@ jobs:
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

release:
runs-on: ubuntu-latest
environment: release
if: github.ref == 'refs/heads/main'
needs:
- test
- lint
- commitlint

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create Github release
# - Publish to PyPI
- name: Python Semantic Release
uses: relekang/python-semantic-release@v7.15.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest
environment: release

steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit df53884

Please sign in to comment.