Use fixed 8Beat applaudio release. #11
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 linux | |
| on: | |
| push: | |
| tags: | |
| - 'release-*' | |
| - 'v*' | |
| jobs: | |
| build-linux-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository. | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Move to the parent directory and 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 ALSA development packages. | |
| - name: Install ALSA development packages | |
| run: sudo apt install libasound2-dev pkg-config | |
| # Step 4: Build project. | |
| - name: Build project | |
| run: | | |
| cd Pilot_Episode | |
| ./build.sh | |
| continue-on-error: false | |
| # Step 5: Upload build artifact. | |
| - name: Upload Linux build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pilot_episode-glibc2.38 | |
| path: Pilot_Episode/bin/ | |
| retention-days: 1 | |
| build-legacy-linux-release: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| # Step 1: Checkout the repository. | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Move to the parent directory and 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 ALSA development packages. | |
| - name: Install ALSA development packages | |
| run: sudo apt install libasound2-dev pkg-config | |
| # Step 4: Build project. | |
| - name: Build project | |
| run: | | |
| cd Pilot_Episode | |
| ./build.sh | |
| continue-on-error: false | |
| # Step 5: Upload build artifact. | |
| - name: Upload Legacy Linux build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pilot_episode-glibc2.35 | |
| path: Pilot_Episode/bin/ | |
| retention-days: 1 | |
| create-linux-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux-release, build-legacy-linux-release] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download GLIBC 2.38 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilot_episode-glibc2.38 | |
| path: glibc2.38 | |
| - name: Download GLIBC 2.35 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilot_episode-glibc2.35 | |
| path: glibc2.35 | |
| - name: Create combined Linux distribution package | |
| run: | | |
| mkdir pilot_episode-${{ github.ref_name }} | |
| cp glibc2.38/pilot_episode pilot_episode-${{ github.ref_name }}/pilot_episode-glibc2.38 | |
| cp glibc2.35/pilot_episode pilot_episode-${{ github.ref_name }}/pilot_episode-glibc2.35 | |
| cp glibc2.38/chiptune2.ct pilot_episode-${{ github.ref_name }}/ | |
| if [ -d glibc2.38/fonts ]; then | |
| cp -r glibc2.38/fonts pilot_episode-${{ github.ref_name }}/ | |
| fi | |
| echo "This package contains two binaries:" > pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "- pilot_episode-glibc2.38: for modern systems (Ubuntu 24.04+, Arch Linux)" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "- pilot_episode-glibc2.35: for legacy systems (WSL, Ubuntu 22.04)" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "Run the binary that matches your system's glibc version." >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo "To run either executable, you might have to first do:" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " chmod ugo+x pilot_episode-glibc2.38" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " or:" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| echo " chmod ugo+x pilot_episode-glibc2.35" >> pilot_episode-${{ github.ref_name }}/README.txt | |
| tar -czf pilot_episode-${{ github.ref_name }}-linux.tar.gz 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: pilot_episode-${{ github.ref_name }}-linux.tar.gz | |
| allowUpdates: true | |
| bodyFile: RELEASE_NOTES.txt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |