Bump actions/upload-artifact from 4 to 5 #1101
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: Codon CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| create_release: | |
| name: GitHub Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Create Release | |
| if: contains(github.ref, 'tags/v') | |
| id: create_release | |
| uses: ncipollo/release-action@v1 | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| arch: linux-x86_64 | |
| - os: ubuntu-latest | |
| arch: manylinux2014-x86_64 | |
| - os: ubuntu-24.04-arm | |
| arch: linux-aarch64 | |
| - os: ubuntu-24.04-arm | |
| arch: manylinux2014-aarch64 | |
| - os: macos-13 | |
| arch: darwin-x86_64 | |
| - os: macos-14 | |
| arch: darwin-arm64 | |
| runs-on: ${{ matrix.os }} | |
| name: Build Codon | |
| needs: create_release | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build (Ubuntu) | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| (cd .github/build-linux && docker build -t local -f Dockerfile.${{ matrix.arch }} .) | |
| docker run -v $(pwd):/github/workspace local /github/workspace ${{ matrix.arch }} yes | |
| - name: Build (macOS) | |
| if: startsWith(matrix.os, 'macos') | |
| run: | | |
| sudo mkdir -p /opt/llvm-codon | |
| sudo chown -R $(whoami) /opt/llvm-codon | |
| curl -L https://github.com/exaloop/llvm-project/releases/download/codon-20.1.7/llvm-codon-20.1.7-${{ matrix.arch }}.tar.bz2 | tar jxf - -C /opt | |
| brew install gcc | |
| bash .github/build-linux/entrypoint.sh ${{ github.workspace }} ${{ matrix.arch }} yes | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: codon-${{ matrix.arch }}.tar.gz | |
| path: codon-${{ matrix.arch }}.tar.gz | |
| - name: Upload Release Asset | |
| if: contains(github.ref, 'tags/v') | |
| uses: actions/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.create_release.outputs.upload_url }} | |
| asset_path: ./codon-${{ matrix.arch }}.tar.gz | |
| asset_name: codon-${{ matrix.arch }}.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Publish PyPI Package | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.arch == 'linux-x86_64' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| build_documentation: | |
| name: Build Docs | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install git+https://${{ secrets.GH_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git | |
| python -m pip install mkdocs \ | |
| mkdocs-autorefs \ | |
| mkdocs-macros-plugin \ | |
| mkdocs-material-extensions \ | |
| mkdocs-redirects | |
| sudo apt-get update | |
| sudo apt-get install -y pngquant | |
| - name: Download Artifact | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: codon-linux-x86_64.tar.gz | |
| path: ./downloaded-artifact | |
| - name: Build API reference | |
| run: | | |
| mv downloaded-artifact/* . | |
| tar -xvzf codon-linux-x86_64.tar.gz | |
| codon-deploy-linux-x86_64/bin/codon doc codon-deploy-linux-x86_64/lib/codon/stdlib > docs.json | |
| python scripts/docgen.py docs.json docs/libraries/api $(pwd)/codon-deploy-linux-x86_64/lib/codon/stdlib | |
| - name: Build MkDocs site | |
| run: mkdocs build --strict | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/master' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site | |
| force_orphan: true | |
| cname: docs.exaloop.io |