Skip to content

Commit

Permalink
fix: Remove code for branch protection in deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
christopheralex authored Jan 29, 2022
1 parent 6aadb64 commit 32e0ba4
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,31 @@ jobs:
with:
fetch-depth: 0

# Disables main branch protection for PSR
- name: Disable admin branch protection
uses: benjefferies/branch-protection-bot@master
if: always()
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
branch: main
enforce_admins: false
# # Disables main branch protection for PSR
# - name: Disable admin branch protection
# uses: benjefferies/branch-protection-bot@master
# if: always()
# with:
# access_token: ${{ secrets.ACCESS_TOKEN }}
# branch: main
# enforce_admins: false

# Use PSR to make release
- name: Python Semantic Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install python-semantic-release
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release publish
# Re enables main branch protection
- name: Enable admin branch protection
uses: benjefferies/branch-protection-bot@master
if: always() # Force to always run this step to ensure "include administrators" is always turned back on
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
branch: main
enforce_admins: true
# # Re enables main branch protection
# - name: Enable admin branch protection
# uses: benjefferies/branch-protection-bot@master
# if: always() # Force to always run this step to ensure "include administrators" is always turned back on
# with:
# access_token: ${{ secrets.ACCESS_TOKEN }}
# branch: main
# enforce_admins: true

# Publish to TestPyPI
- uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit 32e0ba4

Please sign in to comment.