@@ -5,8 +5,8 @@ name: Release
55on :
66 push :
77 tags :
8- - ' v*'
9- - ' test-action-release-*'
8+ - ' v*'
9+ - ' test-action-release-*'
1010env :
1111 GO111MODULE : on
1212jobs :
@@ -15,74 +15,74 @@ jobs:
1515 runs-on : macos-11
1616 timeout-minutes : 20
1717 steps :
18- - uses : actions/setup-go@v2
19- with :
20- go-version : 1.17.x
21- - uses : actions/checkout@v2
22- with :
23- fetch-depth : 1
24- - name : Make darwin artifacts
25- run : make artifacts-darwin
26- - name : " Upload artifacts"
27- uses : actions/upload-artifact@v2
28- with :
29- name : artifacts-darwin
30- path : _artifacts/
18+ - uses : actions/setup-go@v2
19+ with :
20+ go-version : 1.17.x
21+ - uses : actions/checkout@v2
22+ with :
23+ fetch-depth : 1
24+ - name : Make darwin artifacts
25+ run : make artifacts-darwin
26+ - name : " Upload artifacts"
27+ uses : actions/upload-artifact@v2
28+ with :
29+ name : artifacts-darwin
30+ path : _artifacts/
3131 release :
3232 runs-on : ubuntu-20.04
3333 needs : artifacts-darwin
3434 timeout-minutes : 20
3535 steps :
36- - uses : actions/checkout@v2
37- - uses : actions/download-artifact@v2
38- with :
39- name : artifacts-darwin
40- path : _artifacts/
41- - uses : actions/setup-go@v2
42- with :
43- go-version : 1.17.x
44- - name : Install gcc-aarch64-linux-gnu
45- run : |
46- sudo apt-get update
47- sudo apt-get install -y gcc-aarch64-linux-gnu
48- - name : " Compile binaries"
49- run : make artifacts-linux
50- - name : " SHA256SUMS"
51- run : |
52- ( cd _artifacts; sha256sum *.tar.gz ) | tee /tmp/SHA256SUMS
53- mv /tmp/SHA256SUMS _artifacts/SHA256SUMS
54- - name : " The sha256sum of the SHA256SUMS file"
55- run : (cd _artifacts; sha256sum SHA256SUMS)
56- - name : " Prepare the release note"
57- run : |
58- tag="${GITHUB_REF##*/}"
59- shasha=$(sha256sum _artifacts/SHA256SUMS | awk '{print $1}')
60- cat <<-EOF | tee /tmp/release-note.txt
61- ${tag}
36+ - uses : actions/checkout@v2
37+ - uses : actions/download-artifact@v2
38+ with :
39+ name : artifacts-darwin
40+ path : _artifacts/
41+ - uses : actions/setup-go@v2
42+ with :
43+ go-version : 1.17.x
44+ - name : Install gcc-aarch64-linux-gnu
45+ run : |
46+ sudo apt-get update
47+ sudo apt-get install -y gcc-aarch64-linux-gnu
48+ - name : " Compile binaries"
49+ run : make artifacts-linux
50+ - name : " SHA256SUMS"
51+ run : |
52+ ( cd _artifacts; sha256sum *.tar.gz ) | tee /tmp/SHA256SUMS
53+ mv /tmp/SHA256SUMS _artifacts/SHA256SUMS
54+ - name : " The sha256sum of the SHA256SUMS file"
55+ run : (cd _artifacts; sha256sum SHA256SUMS)
56+ - name : " Prepare the release note"
57+ run : |
58+ tag="${GITHUB_REF##*/}"
59+ shasha=$(sha256sum _artifacts/SHA256SUMS | awk '{print $1}')
60+ cat <<-EOF | tee /tmp/release-note.txt
61+ ${tag}
6262
63- (Changes to be documented)
63+ (Changes to be documented)
6464
65- ## Usage
66- \`\`\`console
67- [macOS]$ limactl start
68- ...
69- INFO[0029] READY. Run \`lima\` to open the shell.
65+ ## Usage
66+ \`\`\`console
67+ [macOS]$ limactl start
68+ ...
69+ INFO[0029] READY. Run \`lima\` to open the shell.
7070
71- [macOS]$ lima uname
72- Linux
73- \`\`\`
71+ [macOS]$ lima uname
72+ Linux
73+ \`\`\`
7474
75- - - -
76- The binaries were built automatically on GitHub Actions.
77- The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
75+ - - -
76+ The binaries were built automatically on GitHub Actions.
77+ The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
7878
79- The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
80- EOF
81- - name : " Create release"
82- env :
83- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
84- run : |
85- tag="${GITHUB_REF##*/}"
86- asset_flags=()
87- for f in _artifacts/*; do asset_flags+=("-a" "$f"); done
88- hub release create "${asset_flags[@]}" -F /tmp/release-note.txt --draft "${tag}"
79+ The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
80+ EOF
81+ - name : " Create release"
82+ env :
83+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
84+ run : |
85+ tag="${GITHUB_REF##*/}"
86+ asset_flags=()
87+ for f in _artifacts/*; do asset_flags+=("-a" "$f"); done
88+ hub release create "${asset_flags[@]}" -F /tmp/release-note.txt --draft "${tag}"
0 commit comments