File tree Expand file tree Collapse file tree 1 file changed +24
-7
lines changed
Expand file tree Collapse file tree 1 file changed +24
-7
lines changed Original file line number Diff line number Diff line change 1- name : (On Release) Build & Upload
1+ name : " ( Release): Build"
22
33on :
44 release :
55 types : [created]
66
77jobs :
8- build :
8+ install :
99 uses : ./.github/workflows/build.yml
1010 with :
1111 ref : ${{ github.event.release.tag_name }}
1212
1313 upload :
14- needs : build
14+ needs : install
1515 runs-on : ubuntu-latest
1616 steps :
17+ - name : Get artifact url
18+ id : artifact
19+ run : |
20+ url="${{ needs.install.outputs.artifact_url }}"
21+ id="${url##*/}"
22+ echo "id=$id" >> $GITHUB_OUTPUT
23+
1724 - name : Download built zip
25+ id : download
1826 uses : actions/download-artifact@v4
1927 with :
20- name : code-snippets- ${{ github.sha }}.zip
28+ artifact-ids : ${{ steps.artifact.outputs.id }}
2129 path : ./dist
2230
31+ - name : Get artifact url
32+ id : zip
33+ run : |
34+ zip_name="${{ needs.install.outputs.artifact_name }}.zip"
35+
36+ cd ./dist/${{ needs.install.outputs.artifact_name }}
37+ zip -r "../$zip_name" .
38+ cd ..
39+
40+ echo "path=$(pwd)/$zip_name" >> $GITHUB_OUTPUT
41+
2342 - name : Upload release asset
2443 uses : softprops/action-gh-release@v2
2544 with :
26- files : ./dist/code-snippets-*.zip
27- env :
28- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ files : ${{ steps.zip.outputs.path }}
2946
3047 # deploy:
3148 # needs: upload
You can’t perform that action at this time.
0 commit comments