mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-24 00:28:04 -05:00
add secrets check to release workflow
[skip build]
This commit is contained in:
parent
2a7a6444ee
commit
ee3f80d572
1 changed files with 19 additions and 0 deletions
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -20,6 +20,25 @@ jobs:
|
|||
- name: Clone Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check Secrets
|
||||
run: |
|
||||
if [ -z "${{ secrets.MODRINTH_TOKEN }}" ]; then
|
||||
echo "MODRINTH_TOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${{ secrets.CURSEFORGE_TOKEN }}" ]; then
|
||||
echo "CURSEFORGE_TOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Validate Modrinth Token
|
||||
run: |
|
||||
curl -s -H "Authorization: ${{ secrets.MODRINTH_TOKEN }}" https://api.modrinth.com/v2/user | grep -q "unauthorized"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "MODRINTH_TOKEN is not valid"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up JDK ${{ env.JAVA_VERSION }}
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
|
|
Loading…
Reference in a new issue