diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7999f69a7..14f348616 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,3 +161,67 @@ jobs: APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }} run: | ./upload-artifacts.sh release jammy + + release: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + name: [Ubuntu-20, Ubuntu-22, Debian-11, Debian-12] + include: + - name: Ubuntu-20 + image: "ubuntu:20.04" + suite: focal + install: "make ca-certificates git curl golang" + - name: Ubuntu-22 + image: "ubuntu:22.04" + suite: jammy + install: "make ca-certificates git curl golang" + - name: Debian-11 + image: "debian:bullseye" + suite: bullseye + install: "make ca-certificates git curl golang" + - name: Debian-12 + image: "debian:bookworm" + suite: bookworm + install: "make ca-certificates git curl golang" + container: + image: ${{ matrix.image }} + env: + APT_LISTCHANGES_FRONTEND: none + DEBIAN_FRONTEND: noninteractive + steps: + - name: Install O/S packages + run: | + apt-get update + apt-get install -y --no-install-recommends ${{ matrix.install }} + git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Checkout repository + uses: actions/checkout@v3 + with: + # fetch the whole repo for `git describe` to + # work and get the nightly verion + fetch-depth: 0 + + - name: Make Release + env: + GOBIN: /usr/local/bin + run: | + make release + + - name: Publish nightly release to aptly + # if: github.ref == 'refs/heads/master' + env: + APTLY_USER: ${{ secrets.APTLY_USER }} + APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }} + run: | + ./upload-artifacts.sh nightly ${{ matrix.suite }} + + - name: Publish release to aptly + if: startsWith(github.event.ref, 'refs/tags') + env: + APTLY_USER: ${{ secrets.APTLY_USER }} + APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }} + run: | + ./upload-artifacts.sh release ${{ matrix.suite }}