File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed
Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 648648 " run " : " bazel run @org_golang_x_lint//golint -- -set_exit_status $(pwd)/..."
649649 }
650650 ]
651+ },
652+ " publish " : {
653+ " name " : " publish" ,
654+ " needs " : [
655+ " build_and_test"
656+ ],
657+ " runs-on " : " ubuntu-latest" ,
658+ " steps " : [
659+ {
660+ " name " : " Download release artifacts" ,
661+ " uses " : " actions/download-artifact@v4" ,
662+ " with " : {
663+ " merge-multiple " : true
664+ }
665+ },
666+ {
667+ " name " : " Calculate shasum" ,
668+ " run " : " shasum -a 256 assets/* > sha256"
669+ },
670+ {
671+ " name " : " Create GitHub release and upload artifacts" ,
672+ " uses " : " softprops/action-gh-release@v2" ,
673+ " with " : {
674+ " files " : [
675+ " assets/*" ,
676+ " sha256"
677+ ],
678+ " make_latest " : true
679+ }
680+ }
681+ ]
651682 }
652683 },
653684 " name " : " main" ,
Original file line number Diff line number Diff line change 148148 else []
149149 ),
150150 },
151+ [if doUpload then 'publish' ]: {
152+ 'runs-on' : 'ubuntu-latest' ,
153+ name: 'publish' ,
154+ needs: ['build_and_test' ],
155+ steps: [
156+ {
157+ name: 'Download release artifacts' ,
158+ uses: 'actions/download-artifact@v4' ,
159+ with: {
160+ 'merge-multiple' : true ,
161+ },
162+ },
163+ {
164+ name: 'Calculate shasum' ,
165+ run: 'shasum -a 256 assets/* > sha256' ,
166+ },
167+ {
168+ name: 'Create GitHub release and upload artifacts' ,
169+ uses: 'softprops/action-gh-release@v2' ,
170+ with: {
171+ make_latest: true ,
172+ files: ['assets/*' , 'sha256' ],
173+ },
174+ },
175+ ],
176+ },
151177 lint: {
152178 'runs-on' : 'ubuntu-latest' ,
153179 name: 'lint' ,
You can’t perform that action at this time.
0 commit comments