[Release] Preparing release 0.9.0 #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Triggers on version tags like v0.2.0, v0.3.0, etc. | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| jobs: | |
| build-and-release: | |
| runs-on: macos-14 # macOS 14 (Sonoma) with Apple Silicon support | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.0" | |
| - name: Extract version from tag | |
| id: get_version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| else | |
| VERSION="0.2.0-dev" | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build app bundle | |
| run: | | |
| chmod +x ./create_app_bundle.sh | |
| # Update version in script | |
| sed -i '' "s/VERSION=\".*\"/VERSION=\"${{ steps.get_version.outputs.VERSION }}\"/" create_app_bundle.sh | |
| ./create_app_bundle.sh | |
| - name: Create DMG | |
| run: | | |
| chmod +x ./create_dmg.sh | |
| # Update version in script | |
| sed -i '' "s/VERSION=\".*\"/VERSION=\"${{ steps.get_version.outputs.VERSION }}\"/" create_dmg.sh | |
| ./create_dmg.sh | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| UntoldEngineStudio-${{ steps.get_version.outputs.VERSION }}.dmg | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload DMG artifact (for manual builds) | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: UntoldEngineStudio-${{ steps.get_version.outputs.VERSION }} | |
| path: UntoldEngineStudio-${{ steps.get_version.outputs.VERSION }}.dmg |