Skip to content

Merge pull request #2404 from gemini-platform/fix-tracker #49

Merge pull request #2404 from gemini-platform/fix-tracker

Merge pull request #2404 from gemini-platform/fix-tracker #49

Workflow file for this run

# See https://github.com/containerd/nerdctl/blob/main/MAINTAINERS_GUIDE.md for how to make a release.
name: Release
on:
push:
tags:
- 'v*'
- 'test-action-release-*'
env:
GO111MODULE: on
jobs:
release:
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: "Compile binaries"
run: make artifacts
- name: "SHA256SUMS"
run: |
( cd _output; sha256sum nerdctl-* ) | tee /tmp/SHA256SUMS
mv /tmp/SHA256SUMS _output/SHA256SUMS
- name: "The sha256sum of the SHA256SUMS file"
run: (cd _output; sha256sum SHA256SUMS)
- name: "Prepare the release note"
run: |
tag="${GITHUB_REF##*/}"
shasha=$(sha256sum _output/SHA256SUMS | awk '{print $1}')
cat <<-EOF | tee /tmp/release-note.txt
${tag}
$(hack/generate-release-note.sh)
- - -
The binaries were built automatically on GitHub Actions.
The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
- - -
Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])
EOF
- name: "Create release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF##*/}"
asset_flags=()
for f in _output/*; do asset_flags+=("-a" "$f"); done
hub release create "${asset_flags[@]}" -F /tmp/release-note.txt --draft "${tag}"