-
-
Notifications
You must be signed in to change notification settings - Fork 8
36 lines (31 loc) · 1.18 KB
/
update-release-metadata.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
name: Update Release Metadata
on:
push:
branches: ["main"]
jobs:
update-release-metadata:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download .env.development file and delete it after the workflow is finished
uses: zdeneklapes/dotenv-vault-action@v2
with:
dotenvMe: ${{ secrets.VAULT_TOKEN }}
stage: "development"
delete: "true"
- name: Fetch the latest release data
id: fetch_release
run: |
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ env.TOKEN_VALHALLA }}" \
https://api.github.com/repos/tursodatabase/turso-client-php/releases/latest \
-o release_metadata.json
- name: Commit and push if changed
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add release_metadata.json
git commit -m "Update release metadata" || exit 0 # Exit 0 if no changes
git push