Updating the forge lock file. #12
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: release macos | |
| on: | |
| push: | |
| tags: | |
| - 'release-*' | |
| - 'v*' | |
| jobs: | |
| build-macos-release: | |
| runs-on: macos-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Fetch dependencies | |
| - name: Fetch dependencies | |
| run: | | |
| cd .. | |
| mkdir lib | |
| cd lib | |
| git clone https://github.com/razterizer/Core.git | |
| git clone https://github.com/razterizer/Termin8or.git | |
| git clone https://github.com/razterizer/8Beat.git | |
| git clone https://github.com/razterizer/AudioLibSwitcher_applaudio.git --recurse-submodules | |
| git clone https://github.com/razterizer/applaudio.git | |
| # Step 3: Install OpenAL (if needed) | |
| - name: Install OpenAL | |
| if: false # Set to true if you need OpenAL | |
| run: brew install openal-soft | |
| # Step 4: Build project | |
| - name: Build project | |
| run: | | |
| cd Pilot_Episode | |
| ./build.sh | |
| continue-on-error: false | |
| # Step 5: Upload build artifact | |
| - name: Upload macOS build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pilot_episode-macos-build | |
| path: Pilot_Episode/bin/ | |
| retention-days: 1 | |
| create-macos-release: | |
| runs-on: ubuntu-latest | |
| needs: build-macos-release | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download macOS build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilot_episode-macos-build | |
| path: macos-build | |
| - name: Create macOS distribution package | |
| run: | | |
| cd macos-build | |
| # Create a clean distribution folder | |
| mkdir -p pilot_episode-${{ github.ref_name }} | |
| # Copy the executable and necessary files | |
| chmod ugo+x pilot_episode | |
| cp pilot_episode pilot_episode-${{ github.ref_name }}/ | |
| # cp hiscores.txt pilot_episode-${{ github.ref_name }}/ | |
| cp chiptune2.ct pilot_episode-${{ github.ref_name }}/ | |
| # Copy fonts directory (if it exists) | |
| if [ -d fonts ]; then | |
| cp -r fonts pilot_episode-${{ github.ref_name }}/ | |
| fi | |
| echo "Unblock instructions:" > pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "=====================" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "To tell the gatekeeper that this executable is fine" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " you can unblock the executable with" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " the following command:" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " xattr -dr com.apple.quarantine pilot_episode" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| # Create zip archive | |
| zip -r pilot_episode-${{ github.ref_name }}-macos.zip pilot_episode-${{ github.ref_name }}/ | |
| - name: Extract tag annotation as release notes | |
| id: notes | |
| run: | | |
| git fetch --tags --force | |
| TAG="${{ github.ref_name }}" | |
| git tag -l --format='%(contents)' "$TAG" > RELEASE_NOTES.txt | |
| echo "Release notes extracted from tag annotation:" | |
| cat RELEASE_NOTES.txt | |
| - name: Upload package to release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.ref_name }} | |
| artifacts: macos-build/pilot_episode-${{ github.ref_name }}-macos.zip | |
| allowUpdates: true | |
| bodyFile: RELEASE_NOTES.txt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |