Skip to content

Commit

Permalink
Fix missing env variables and make it error if they don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcassidy committed May 18, 2024
1 parent 0c7f6dd commit 65031be
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ksp-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Generate Version Info
run: |
echo "VERSION_TITLE=$(yaclog show -n)" >> $GITHUB_ENV
yaclog show
python Scripts/version.py
yaclog-ksp -n "Conformal Decals"
Expand Down Expand Up @@ -99,11 +99,18 @@ jobs:
python -m pip install --upgrade pip
python -m pip install yaclog
- name: Get version name and body
run: |
echo "VERSION_TITLE=$(yaclog show -n)" >> $GITHUB_ENV
echo "VERSION_CHANGELOG=$(yaclog show -mb)" >> $GITHUB_ENV
yaclog show
- name: Download Build Artifacts
uses: actions/download-artifact@v4

- name: Zip Download Packages
run: |
set -u
mkdir bundled
mkdir unbundled
zip -r bundled/ConformalDecals-$VERSION_TITLE.zip ConformalDecals/*
Expand All @@ -112,22 +119,24 @@ jobs:
- name: Publish to Spacedock
run: |
set -u
curl -F "username=drewcassidy" -F "password=${{ secrets.SPACEDOCK_PASS }}" \
-c ./cookies "https://spacedock.info/api/login"
curl -c ./cookies -b ./cookies \
-F "version=$VERSION_TITLE" \
-F "changelog=$(yaclog show -mb)" \
-F "changelog=$VERSION_CHANGELOG" \
-F "game-version=1.12.3" \
-F "notify-followers=yes" \
-F "zipball=@bundled/ConformalDecals-$VERSION_TITLE.zip" \
"https://spacedock.info/api/mod/2451/update"
- name: Publish to Github
run: |
set -u
gh release create ${{ github.ref_name }} \
--notes "$(yaclog show -mb)" \
--title "Version $(yaclog show -n)" \
bundled/ConformalDecals-*.zip \
--notes "$VERSION_CHANGELOG" \
--title "Version $VERSION_TITLE" \
bundled/ConformalDecals-*.zip
ConformalDecals/GameData/ConformalDecals/Versioning/ConformalDecals.version
env:
Expand Down

0 comments on commit 65031be

Please sign in to comment.