Skip to content

Commit

Permalink
Maintenance (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova authored Nov 29, 2024
1 parent b951bf5 commit cc8b8f7
Showing 1 changed file with 18 additions and 93 deletions.
111 changes: 18 additions & 93 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ jobs:

release:
if: startsWith(github.ref, 'refs/tags')
permissions:
contents: write
runs-on: ubuntu-20.04
needs:
- Windows-Simulator
Expand All @@ -644,28 +646,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: ./tools/GHAction/daily_env.sh
- name: Generate Change Log
run: |
git fetch --prune --unshallow
git fetch origin '+refs/tags/*:refs/tags/*'
GIT_LOG=$(git log --format='* %s (%h)' --branches=master --ancestry-path $(git describe --tags --abbrev=0 $GITHUB_REF^)..$(git describe --tags --abbrev=0 $GITHUB_REF)) || true
if [ -n "$GIT_LOG" ]
then
GIT_LOG="Changes since previous build:
$GIT_LOG
For linux it is recommended to use snap:
sudo snap install solar2d
"
else
GIT_LOG='See https://github.com/coronalabs/corona for details
'
fi
echo 'GIT_LOG<<EOF' >> $GITHUB_ENV
echo "$GIT_LOG" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "$GIT_LOG"
- uses: actions/download-artifact@v4
with:
name: Simulator-macOS
Expand Down Expand Up @@ -698,79 +678,24 @@ jobs:
with:
name: Snap
path: Snap
- run: find Snap -name '*.snap' -execdir mv -v {} s2d.snap \; -quit
- name: Rename Artifacts
run: |
set -x
mkdir artifacts
mv Simulator-macOS/Corona-${{ env.YEAR }}.${{ env.BUILD }}.dmg artifacts/Solar2D-macOS-${{ env.YEAR }}.${{ env.BUILD }}.dmg
mv Simulator-Windows/Corona-${{ env.BUILD }}.msi artifacts/Solar2D-Windows-${{ env.YEAR }}.${{ env.BUILD }}.msi
mv CoronaCards-iOS/CoronaCards.framework.zip artifacts/CoronaCards-iOS-${{ env.YEAR }}.${{ env.BUILD }}.zip
mv CoronaCards-iOS-angle/CoronaCards-angle.zip artifacts/CoronaCards-iOS-MetalANGLE-${{ env.YEAR }}.${{ env.BUILD }}.zip
mv CoronaCards-Android/CoronaCardsAndroidAAR.zip artifacts/CoronaCards-Android-${{ env.YEAR }}.${{ env.BUILD }}.zip
mv Native/AndroidDebugSymbols.zip artifacts/AndroidDebugSymbols-${{ env.YEAR }}.${{ env.BUILD }}.zip
find Snap -name '*.snap' -execdir mv -v {} artifacts/Solar2D-Linux-${{ env.YEAR }}.${{ env.BUILD }}_amd64.snap \; -quit
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: ${{ github.ref }}
release_name: Solar2D ${{ env.YEAR }}.${{ env.BUILD }}
body: ${{ env.GIT_LOG }}
- name: Upload Release Asset for macOS Simulator
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Simulator-macOS/Corona-${{ env.YEAR }}.${{ env.BUILD }}.dmg
asset_name: Solar2D-macOS-${{ env.YEAR }}.${{ env.BUILD }}.dmg
asset_content_type: application/x-apple-diskimage
- name: Upload Release Asset for Windows Simulator
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Simulator-Windows/Corona-${{ env.BUILD }}.msi
asset_name: Solar2D-Windows-${{ env.YEAR }}.${{ env.BUILD }}.msi
asset_content_type: application/x-msi
- name: Upload Release Asset for Linux Snap
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Snap/s2d.snap
asset_name: Solar2D-Linux-${{ env.YEAR }}.${{ env.BUILD }}_amd64.snap
asset_content_type: application/octet-stream
- name: Upload Release Asset Corona Cards iOS
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-iOS/CoronaCards.framework.zip
asset_name: CoronaCards-iOS-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Corona Cards iOS Angle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-iOS-angle/CoronaCards-angle.zip
asset_name: CoronaCards-iOS-MetalANGLE-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Corona Cards Android
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CoronaCards-Android/CoronaCardsAndroidAAR.zip
asset_name: CoronaCards-Android-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Android Debug Symbols
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Native/AndroidDebugSymbols.zip
asset_name: AndroidDebugSymbols-${{ env.YEAR }}.${{ env.BUILD }}.zip
asset_content_type: application/zip
files: artifacts/*
name: Solar2D ${{ env.YEAR }}.${{ env.BUILD }}
generate_release_notes: true


notify-chats:
if: startsWith(github.ref, 'refs/tags')
Expand Down

0 comments on commit cc8b8f7

Please sign in to comment.