github.com/containerd/nerdctl@v1.7.7/.github/workflows/release.yml (about)

     1  # See https://github.com/containerd/nerdctl/blob/main/MAINTAINERS_GUIDE.md for how to make a release.
     2  name: Release
     3  on:
     4    push:
     5      tags:
     6      - 'v*'
     7      - 'test-action-release-*'
     8  env:
     9    GO111MODULE: on
    10  jobs:
    11    release:
    12      runs-on: ubuntu-24.04
    13      timeout-minutes: 40
    14      steps:
    15      - uses: actions/checkout@v4.1.1
    16      - uses: actions/setup-go@v5
    17        with:
    18          go-version: 1.23.x
    19      - name: "Compile binaries"
    20        run: make artifacts
    21      - name: "SHA256SUMS"
    22        run: |
    23          ( cd _output; sha256sum nerdctl-* ) | tee /tmp/SHA256SUMS
    24          mv /tmp/SHA256SUMS _output/SHA256SUMS
    25      - name: "The sha256sum of the SHA256SUMS file"
    26        run: (cd _output; sha256sum SHA256SUMS)
    27      - name: "Prepare the release note"
    28        run: |
    29          shasha=$(sha256sum _output/SHA256SUMS | awk '{print $1}')
    30          cat <<-EOF | tee /tmp/release-note.txt
    31          $(hack/generate-release-note.sh)
    32          - - -
    33          The binaries were built automatically on GitHub Actions.
    34          The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
    35  
    36          The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
    37          - - -
    38          Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])
    39          EOF
    40      - name: "Create release"
    41        env:
    42          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    43        run: |
    44          tag="${GITHUB_REF##*/}"
    45          gh release create -F /tmp/release-note.txt --draft --title "${tag}" "${tag}" _output/*