Skip to content

Commit 1b0d2f6

Browse files
chore: Rename AUTH_KEY to PRIVATE_KEY to make it clearer
1 parent 7c67757 commit 1b0d2f6

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v3
2020

21-
- name: Run custom action
21+
- name: Upload Release Notes to TestFlight
2222
uses: nthState/UploadTestFlightReleaseNotes
2323
with:
2424
ISSUER_ID: ${{ secrets.APPCONNECT_API_ISSUER }}
2525
KEY_ID: ${{ secrets.APPCONNECT_API_KEY_ID }}
26-
AUTH_KEY: ${{ secrets.APPCONNECT_API_KEY_PRIVATE }}
26+
PRIVATE_KEY: ${{ secrets.APPCONNECT_API_KEY_PRIVATE }}
2727
APP_ID: id of the app
2828
WHATS_NEW: "detail item that has changed"
2929
BUILD_NUMBER: the build number you want to change
@@ -34,9 +34,23 @@ jobs:
3434

3535
### Docker
3636

37+
Build the docker
38+
3739
```bash
3840
docker build . -t githubactiontest -f Dockerfile
39-
docker run -e ISSUER_ID=a -e KEY_ID=a -e AUTH_KEY=a -e APP_ID=a -e WHATS_NEW=a -e BUILD_NUMBER=a -d githubactiontest
41+
```
42+
43+
Run the docker
44+
45+
```bash
46+
docker run \
47+
-e ISSUER_ID=appstore connect api issuer id \
48+
-e KEY_ID=appstore connect api key id \
49+
-e PRIVATE_KEY=appstore connect api private key \
50+
-e APP_ID=app id \
51+
-e WHATS_NEW="Your update text, max 4000 chars" \
52+
-e BUILD_NUMBER= your build number \
53+
-d githubactiontest
4054
```
4155

4256

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ inputs:
77
KEY_ID:
88
description: 'Key ID from AppStore Connect'
99
required: true
10-
AUTH_KEY:
11-
description: 'Auth Key from AppStore Connect'
10+
PRIVATE_KEY:
11+
description: 'Private Key from AppStore Connect'
1212
required: true
1313
APP_ID:
1414
description: 'App ID from AppStore Connect'

main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class UploadTestFlightReleaseNotes:
99

10-
def generateToken(self, issuer_id, key_id, auth_key):
10+
def generateToken(self, issuer_id, key_id, private_key):
1111

1212
current_time = datetime.datetime.now(datetime.timezone.utc)
1313
unix_timestamp = current_time.timestamp()
@@ -22,7 +22,7 @@ def generateToken(self, issuer_id, key_id, auth_key):
2222

2323
headers = {'kid': key_id}
2424

25-
encoded_token = jwt.encode(data, auth_key, algorithm='ES256', headers=headers)
25+
encoded_token = jwt.encode(data, private_key, algorithm='ES256', headers=headers)
2626

2727
return encoded_token
2828

@@ -79,14 +79,14 @@ def main():
7979

8080
issuer_id = os.getenv('ISSUER_ID')
8181
key_id = os.getenv('KEY_ID')
82-
auth_key = os.getenv('AUTH_KEY')
82+
private_key = os.getenv('PRIVATE_KEY')
8383

8484
app_id = os.getenv('APP_ID')
8585
whats_new = os.getenv('WHATS_NEW')
8686
build_number = os.getenv('BUILD_NUMBER')
8787

8888
service = UploadTestFlightReleaseNotes()
89-
token = service.generateToken(issuer_id, key_id, auth_key)
89+
token = service.generateToken(issuer_id, key_id, private_key)
9090
reason = service.uploadNotes(app_id, token, whats_new, build_number)
9191

9292
print(reason)

requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
beautifulsoup4==4.12.3
21
certifi==2024.2.2
32
cffi==1.16.0
43
charset-normalizer==3.3.2
54
cryptography==42.0.7
65
idna==3.7
7-
Markdown==3.6
86
pycparser==2.22
97
PyJWT==2.8.0
108
requests==2.32.3
11-
soupsieve==2.5
129
urllib3==2.2.1

0 commit comments

Comments
 (0)