dep

Package manager for embedded C libraries
git clone git://git.finwo.net/app/dep
Log | Files | Refs | README | LICENSE

release.yml (1682B)


      1 name: Release
      2 
      3 on:
      4   push:
      5     tags:
      6       - '*'
      7 
      8 jobs:
      9   build:
     10     runs-on: ${{ matrix.runs-on }}
     11     strategy:
     12       matrix:
     13         include:
     14           - runs-on: ubuntu-24.04
     15             os: linux
     16             arch: x64
     17           - runs-on: ubuntu-24.04-arm
     18             os: linux
     19             arch: arm64
     20           - runs-on: macos-14
     21             os: macos
     22             arch: arm64
     23 
     24     steps:
     25       - name: Checkout code
     26         uses: actions/checkout@v4
     27 
     28       - name: Set artifact name
     29         id: artifact
     30         run: |
     31           ARTIFACT="dep-${{ matrix.os }}-${{ matrix.arch }}"
     32           echo "name=$ARTIFACT" >> $GITHUB_OUTPUT
     33 
     34       - name: Install dependencies
     35         run: |
     36           if [[ "${{ matrix.os }}" == "linux" ]]; then
     37             sudo apt-get update
     38             sudo apt-get install -y clang curl libcurl4-openssl-dev
     39           elif [[ "${{ matrix.os }}" == "macos" ]]; then
     40             brew install curl
     41           fi
     42 
     43       - name: Build
     44         run: make dep
     45 
     46       - name: Rename binary
     47         run: |
     48           mv dep ${{ steps.artifact.outputs.name }}
     49 
     50       - name: Upload artifact
     51         uses: actions/upload-artifact@v4
     52         with:
     53           name: ${{ steps.artifact.outputs.name }}
     54           path: ${{ steps.artifact.outputs.name }}
     55 
     56   release:
     57     needs: build
     58     runs-on: ubuntu-latest
     59     permissions:
     60       contents: write
     61 
     62     steps:
     63       - name: Download all artifacts
     64         uses: actions/download-artifact@v4
     65         with:
     66           path: artifacts
     67 
     68       - name: Create Release
     69         uses: softprops/action-gh-release@v2
     70         with:
     71           files: artifacts/*/*
     72         env:
     73           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}