24
24
uses : actions/setup-node@v3
25
25
with :
26
26
node-version : 20
27
-
28
- - name : Fetch the latest release data
27
+
28
+ - name : Setup Python
29
+ uses : actions/setup-python@v4
30
+ with :
31
+ python-version : ' 3.10'
32
+
33
+ - name : Cache Python Dependencies
34
+ uses : actions/cache@v3
35
+ id : cache
36
+ with :
37
+ path : ~/.cache/pip
38
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-pip-
41
+
42
+ - name : Install Python Dependencies
43
+ run : |
44
+ pip install -r scripts/requirements.txt
45
+
46
+ - name : Fetch the Latest Release Data
29
47
id : fetch_release
48
+ env :
49
+ VAULT_TOKEN : ${{ secrets.VAULT_TOKEN }}
50
+ TOKEN_VALHALLA : ${{ secrets.TOKEN_VALHALLA }}
30
51
run : |
31
52
npx dotenv-vault@latest pull development -y --dotenvMe=${{ secrets.VAULT_TOKEN }}
32
53
source .env
@@ -36,16 +57,12 @@ jobs:
36
57
https://api.github.com/repos/${{ github.repository }}/releases/latest \
37
58
-o $GITHUB_WORKSPACE/release_metadata.json
38
59
39
- - name : Setup Git
40
- run : |
41
- git config user.name "${{ github.actor }}"
42
- git config user.email "${{ github.actor }}@users.noreply.github.com"
43
-
44
- - name : Commit and push changes
60
+ - name : Update Gist File
61
+ env :
62
+ GIST_ID : ${{ secrets.GIST_ID }}
63
+ GIST_TOKEN : ${{ secrets.GIST_TOKEN }}
45
64
run : |
46
- npx dotenv-vault@latest pull development -y --dotenvMe=${{ secrets.VAULT_TOKEN }}
47
- source .env
48
- git add $GITHUB_WORKSPACE/release_metadata.json
49
- git commit -m "Update release metadata"
50
- git remote set-url origin https://x-access-token:${TOKEN_VALHALLA}@github.com/${{ github.repository }}.git
51
- git push origin main
65
+ python scripts/release_metadata.py \
66
+ --gist-id $GIST_ID \
67
+ --actor ${{ github.actor }} \
68
+ --file-content "$(cat $GITHUB_WORKSPACE/release_metadata.json)"
0 commit comments