-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move release CI to separate file (#807)
- Loading branch information
Showing
3 changed files
with
51 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
token: ${{ secrets.PAT_TOKEN }} | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2.2.2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Setup git config | ||
run: | | ||
git config --global user.name "hikari-bot" | ||
git config --global user.email "90276125+hikari-bot[bot]@users.noreply.github.com" | ||
- name: Temporarily disable "include administrators" branch protection | ||
uses: benjefferies/branch-protection-bot@master | ||
with: | ||
access_token: ${{ secrets.PAT_TOKEN }} | ||
enforce_admins: false | ||
|
||
- name: Deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | ||
VERSION: ${{ github.event.release.tag_name }} | ||
REF: ${{ github.sha }} | ||
GITHUB_REPO_SLUG: ${{ github.repository }} | ||
DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }} | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
run: bash scripts/deploy.sh | ||
|
||
- name: Re-enable "include administrators" branch protection | ||
uses: benjefferies/branch-protection-bot@master | ||
if: always() | ||
with: | ||
access_token: ${{ secrets.PAT_TOKEN }} | ||
enforce_admins: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters