This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
- Loading branch information
1 parent
e073746
commit 4f86ed6
Showing
4 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
- 'test-action-release-*' | ||
env: | ||
GO111MODULE: on | ||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15.x | ||
- uses: actions/checkout@v2 | ||
- name: "Compile binaries" | ||
run: make artifacts | ||
- name: "SHA256SUMS" | ||
run: | | ||
( cd _artifacts; sha256sum cni-isolation-* ) | tee /tmp/SHA256SUMS | ||
mv /tmp/SHA256SUMS _artifacts/SHA256SUMS | ||
- name: "The sha256sum of the SHA256SUMS file" | ||
run: (cd _artifacts; sha256sum SHA256SUMS) | ||
- name: "Prepare the release note" | ||
run: | | ||
tag="${GITHUB_REF##*/}" | ||
shasha=$(sha256sum _artifacts/SHA256SUMS | awk '{print $1}') | ||
cat << EOF | tee /tmp/release-note.txt | ||
${tag} | ||
#### Changes | ||
(To be documented) | ||
#### About the binaries | ||
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}\` . | ||
EOF | ||
- name: "Create release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
tag="${GITHUB_REF##*/}" | ||
asset_flags=() | ||
for f in _artifacts/*; do asset_flags+=("-a" "$f"); done | ||
hub release create "${asset_flags[@]}" -F /tmp/release-note.txt --draft "${tag}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/bin | ||
*.test | ||
_artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters