-
-
Notifications
You must be signed in to change notification settings - Fork 94
53 lines (44 loc) · 1.53 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- 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: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Temporarily disable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@v1.1.2
with:
access_token: ${{ steps.generate_token.outputs.token }}
enforce_admins: false
- name: Release
env:
VERSION: ${{ github.event.release.tag_name }}
DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: bash scripts/ci/release.sh
- name: Re-enable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@v1.1.2
if: always()
with:
access_token: ${{ steps.generate_token.outputs.token }}
enforce_admins: true