Update draft release action

This commit is contained in:
larzie 2024-11-07 16:11:40 +03:00 committed by GitHub
parent 9660667888
commit 23138cfc99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,9 +7,10 @@ jobs:
draft: draft:
name: Draft Release name: Draft Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download Development Release - name: Download development release
uses: robinraju/release-downloader@v1.9 uses: robinraju/release-downloader@v1
with: with:
tag: nightly tag: nightly
fileName: '*' fileName: '*'
@ -17,14 +18,14 @@ jobs:
zipBall: true zipBall: true
out-file-path: 'dev' out-file-path: 'dev'
- name: Declare Version Variable - name: Declare version variable
id: ref id: ref
shell: bash shell: bash
run: | run: |
VERSION=$(unzip -p ${{ github.workspace }}/dev/geode-nightly.zip geode-sdk-geode-*/VERSION | xargs) VERSION=$(unzip -p ${{ github.workspace }}/dev/geode-nightly.zip geode-sdk-geode-*/VERSION | xargs)
echo "version=$VERSION" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT
# test if release already exists # Test if release already exists
set +e set +e
curl --fail "https://api.github.com/repos/geode-sdk/geode/releases/tags/v$VERSION" --silent --output /dev/null curl --fail "https://api.github.com/repos/geode-sdk/geode/releases/tags/v$VERSION" --silent --output /dev/null
RESULT=$? RESULT=$?
@ -35,7 +36,7 @@ jobs:
exit 1 exit 1
fi fi
- name: Move Files - name: Move files
run: | run: |
mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe
mv dev/geode-installer-*-mac.pkg geode-installer-v${{ steps.ref.outputs.version }}-mac.pkg mv dev/geode-installer-*-mac.pkg geode-installer-v${{ steps.ref.outputs.version }}-mac.pkg
@ -45,8 +46,8 @@ jobs:
mv dev/geode-*-android64.zip geode-v${{ steps.ref.outputs.version }}-android64.zip mv dev/geode-*-android64.zip geode-v${{ steps.ref.outputs.version }}-android64.zip
mv dev/resources.zip resources.zip mv dev/resources.zip resources.zip
- name: Create Draft Release - name: Create draft release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
@ -54,9 +55,9 @@ jobs:
name: Geode v${{ steps.ref.outputs.version }} name: Geode v${{ steps.ref.outputs.version }}
body: | body: |
TODO before publishing: TODO before publishing:
- mark if pre-release - Mark if pre-release
- add changelog - Add changelog
- remove this - Remove this
draft: true draft: true
files: | files: |
./geode-installer-v${{ steps.ref.outputs.version }}-win.exe ./geode-installer-v${{ steps.ref.outputs.version }}-win.exe