Release Termin8or 3.0.3.9 #44
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 .. | |
| git clone https://github.com/razterizer/Core.git | |
| # Step 3: Build project. | |
| - name: Build project | |
| run: | | |
| cd Examples | |
| ./build_examples.sh | |
| continue-on-error: false | |
| # Step 4: Upload build artifact. | |
| - name: Upload Linux build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: termin8or_examples-glibc2.38 | |
| path: Examples/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 .. | |
| git clone https://github.com/razterizer/Core.git | |
| # Step 3: Build project. | |
| - name: Build project | |
| run: | | |
| cd Examples | |
| ./build_examples.sh | |
| continue-on-error: false | |
| # Step 4: Upload build artifact. | |
| - name: Upload Legacy Linux build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: termin8or_examples-glibc2.35 | |
| path: Examples/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: termin8or_examples-glibc2.38 | |
| path: glibc2.38 | |
| - name: Download GLIBC 2.35 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: termin8or_examples-glibc2.35 | |
| path: glibc2.35 | |
| - name: Create combined Linux distribution package | |
| run: | | |
| mkdir termin8or_examples-${{ github.ref_name }} | |
| cp glibc2.38/examples termin8or_examples-${{ github.ref_name }}/examples-glibc2.38 | |
| cp glibc2.35/examples termin8or_examples-${{ github.ref_name }}/examples-glibc2.35 | |
| # Copy background.tx and colors.tx | |
| cp -r glibc2.38/background.tx termin8or_examples-${{ github.ref_name }}/ | |
| cp -r glibc2.38/colors.tx termin8or_examples-${{ github.ref_name }}/ | |
| echo "This package contains two binaries:" > termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "- examples-glibc2.38: for modern systems (Ubuntu 24.04+, Arch Linux)" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "- examples-glibc2.35: for legacy systems (WSL, Ubuntu 22.04)" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "Run the binary that matches your system's glibc version." >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo "To run either executable, you might have to first do:" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo " chmod ugo+x examples-glibc2.38" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo " or:" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| echo " chmod ugo+x examples-glibc2.35" >> termin8or_examples-${{ github.ref_name }}/README.txt | |
| tar -czf termin8or_examples-${{ github.ref_name }}-linux.tar.gz termin8or_examples-${{ 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: Show ref info | |
| run: | | |
| echo "github.ref: ${{ github.ref }}" | |
| echo "github.ref_name: ${{ github.ref_name }}" | |
| echo "github.event_name: ${{ github.event_name }}" | |
| - name: Upload package to release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.ref_name }} | |
| artifacts: termin8or_examples-${{ github.ref_name }}-linux.tar.gz | |
| allowUpdates: true | |
| bodyFile: RELEASE_NOTES.txt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| forge-release-boxes: | |
| # forge-managed: release-boxes@2 | |
| name: Publish Forge cboxes | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Resolve latest Forge release | |
| id: forge-release | |
| uses: actions/github-script@v7 | |
| with: | |
| result-encoding: string | |
| script: >- | |
| return (await github.rest.repos.getLatestRelease({ | |
| owner: 'razterizer', repo: 'forge' })).data.tag_name | |
| - name: Checkout Forge | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: razterizer/forge | |
| ref: ${{ steps.forge-release.outputs.result }} | |
| path: .forge-bootstrap | |
| - name: Build Forge | |
| run: >- | |
| cmake -S .forge-bootstrap -B .forge-bootstrap/build -G Ninja | |
| -DCMAKE_BUILD_TYPE=Release -DFORGE_BUILD_TESTS=OFF | |
| && cmake --build .forge-bootstrap/build | |
| - name: Prepare Forge release boxes | |
| run: ./.forge-bootstrap/build/forge workflow prepare-release | |
| - name: Publish Forge release boxes | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: boxes/*.cbox,boxes/*.sha256 | |
| tag: ${{ github.ref_name }} |