tag-assets.yml (2676B)
1 --- 2 3 name: Tag Assets 4 on: 5 push: 6 tags: 7 - stable 8 - edge 9 10 jobs: 11 12 build-packages: 13 name: Attach packages to release 14 runs-on: ${{ matrix.os }} 15 strategy: 16 matrix: 17 include: 18 - os: ubuntu-latest 19 arch: x86_64 20 target: linux-glibc-amd64 21 mode: native 22 - os: ubuntu-latest 23 arch: x86_64 24 target: linux-musl-amd64 25 mode: alpine 26 steps: 27 - uses: actions/checkout@v3 28 - uses: jirutka/setup-alpine@v1 29 if: ${{ matrix.mode == 'alpine' }} 30 with: 31 branch: v3.18 32 arch: ${{ matrix.arch }} 33 34 # TODO: run uraimo/run-on-arch-action@v2 for bash/glibc 35 # TODO: run setup-alpine only for musl 36 37 - if: ${{ matrix.mode == 'native' }} 38 name: Install required packages (native) 39 run: ./.github/install-pkg.sh pandoc 40 41 - if: ${{ matrix.mode == 'alpine' }} 42 name: Install required packages (alpine) 43 shell: alpine.sh --root {0} 44 run: | 45 ./.github/install-pkg.sh bash 46 ./.github/install-pkg.sh binutils 47 ./.github/install-pkg.sh build-base 48 ./.github/install-pkg.sh coreutils 49 ./.github/install-pkg.sh curl 50 ./.github/install-pkg.sh envsubst 51 ./.github/install-pkg.sh linux-headers 52 ./.github/install-pkg.sh pandoc 53 54 - uses: finwo/dep@edge 55 name: Install dep (native) 56 if: ${{ matrix.mode == 'native' }} 57 58 - if: ${{ matrix.mode == 'alpine' }} 59 name: Install dep (alpine) 60 shell: alpine.sh --root {0} 61 run: | 62 curl -sSL https://raw.githubusercontent.com/finwo/dep/edge/dist/dep -o /usr/bin/dep 63 chmod +x /usr/bin/dep 64 65 - if: ${{ matrix.mode == 'native' }} 66 name: Build generic package (native) 67 run: | 68 make package TARGET=${{ matrix.target }} SVC=generic 69 make package TARGET=${{ matrix.target }} SVC=openrc 70 make package TARGET=${{ matrix.target }} SVC=procd 71 72 - if: ${{ matrix.mode == 'alpine' }} 73 name: Build generic package (alpine) 74 shell: alpine.sh {0} 75 run: | 76 make package TARGET=${{ matrix.target }} SVC=generic 77 make package TARGET=${{ matrix.target }} SVC=openrc 78 make package TARGET=${{ matrix.target }} SVC=procd 79 80 - name: Upload packages to release 81 uses: svenstaro/upload-release-action@v2 82 with: 83 repo_token: ${{ secrets.GITHUB_TOKEN }} 84 file: build/${{ matrix.target }}/pmlag-*-${{ matrix.target }}.tar.gz 85 file_glob: true 86 overwrite: true 87 tag: ${{ github.ref }}