name: Draft Release on: workflow_dispatch: jobs: draft: name: Draft Release runs-on: ubuntu-latest steps: - name: Download development release uses: robinraju/release-downloader@v1 with: tag: nightly fileName: '*' tarBall: false zipBall: true out-file-path: 'dev' - name: Declare version variable id: ref shell: bash run: | VERSION=$(unzip -p ${{ github.workspace }}/dev/geode-nightly.zip geode-sdk-geode-*/VERSION | xargs) echo "version=$VERSION" >> $GITHUB_OUTPUT # Test if release already exists set +e curl --fail "https://api.github.com/repos/geode-sdk/geode/releases/tags/v$VERSION" --silent --output /dev/null RESULT=$? set -e if [ $RESULT -eq 0 ]; then echo "Release $VERSION already exists! Not replacing it.." exit 1 fi - name: Move files run: | 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-*-win.zip geode-v${{ steps.ref.outputs.version }}-win.zip mv dev/geode-*-mac.zip geode-v${{ steps.ref.outputs.version }}-mac.zip mv dev/geode-*-android32.zip geode-v${{ steps.ref.outputs.version }}-android32.zip mv dev/geode-*-android64.zip geode-v${{ steps.ref.outputs.version }}-android64.zip mv dev/resources.zip resources.zip - name: Create draft release uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: v${{ steps.ref.outputs.version }} name: Geode v${{ steps.ref.outputs.version }} body: | TODO before publishing: - Mark if pre-release - Add changelog - Remove this draft: true files: | ./geode-installer-v${{ steps.ref.outputs.version }}-win.exe ./geode-installer-v${{ steps.ref.outputs.version }}-mac.pkg ./geode-v${{ steps.ref.outputs.version }}-win.zip ./geode-v${{ steps.ref.outputs.version }}-mac.zip ./geode-v${{ steps.ref.outputs.version }}-android32.zip ./geode-v${{ steps.ref.outputs.version }}-android64.zip ./resources.zip