| # Build the Boulder Debian package on tag push, and attach it to a GitHub | |
| # release. | |
| # | |
| # Keep the GO_VERSION matrix and the container-building steps in sync with | |
| # try-release.yml. | |
| name: Build release | |
| on: | |
| push: | |
| tags: | |
| - '**' | |
| jobs: | |
| draft-release: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: '0' # Needed for verify-release-ancestry.sh to see origin/main | |
| - name: Verify release ancestry | |
| run: ./tools/verify-release-ancestry.sh "$GITHUB_SHA" | |
| - name: Create draft release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # https://cli.github.com/manual/gh_release_create | |
| run: gh release create --draft --generate-notes "${GITHUB_REF_NAME}" | |
| push-release: | |
| needs: draft-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| GO_VERSION: | |
| - "1.25.8" | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: '0' # Needed for verify-release-ancestry.sh to see origin/main | |
| - name: Build Boulder container and .deb | |
| id: build | |
| env: | |
| GO_VERSION: ${{ matrix.GO_VERSION }} | |
| run: ./tools/container-build.sh | |
| - name: Tag Boulder container | |
| run: docker tag boulder "ghcr.io/letsencrypt/boulder:${GITHUB_REF_NAME}-go${{ matrix.GO_VERSION }}" | |
| - name: Compute checksums | |
| id: checksums | |
| # The files listed on this line must be identical to the files uploaded | |
| # in the last step. | |
| run: sha256sum boulder*.deb boulder*.tar.gz >| boulder-${{ matrix.GO_VERSION }}.$(date +%s)-$(git rev-parse --short=8 HEAD).checksums.txt | |
| - name: Upload release files | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # https://cli.github.com/manual/gh_release_upload | |
| run: gh release upload "${GITHUB_REF_NAME}" boulder*.deb boulder*.tar.gz boulder*.checksums.txt | |
| - name: Build ct-test-srv container | |
| run: docker buildx build . --build-arg "GO_VERSION=${{ matrix.GO_VERSION }}" -f test/ct-test-srv/Dockerfile -t "ghcr.io/letsencrypt/ct-test-srv:${GITHUB_REF_NAME}-go${{ matrix.GO_VERSION }}" | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push Boulder container | |
| run: docker push "ghcr.io/letsencrypt/boulder:${GITHUB_REF_NAME}-go${{ matrix.GO_VERSION }}" | |
| - name: Push ct-test-srv container | |
| run: docker push "ghcr.io/letsencrypt/ct-test-srv:${GITHUB_REF_NAME}-go${{ matrix.GO_VERSION }}" | |
| publish-release: | |
| needs: push-release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Publish release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # https://cli.github.com/manual/gh_release_edit | |
| run: gh release edit --draft=false "${GITHUB_REF_NAME}" |