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"
2
2
3
3
on :
4
4
release :
5
5
types : [created]
6
6
7
7
jobs :
8
- build :
8
+ install :
9
9
uses : ./.github/workflows/build.yml
10
10
with :
11
11
ref : ${{ github.event.release.tag_name }}
12
12
13
13
upload :
14
- needs : build
14
+ needs : install
15
15
runs-on : ubuntu-latest
16
16
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
+
17
24
- name : Download built zip
25
+ id : download
18
26
uses : actions/download-artifact@v4
19
27
with :
20
- name : code-snippets- ${{ github.sha }}.zip
28
+ artifact-ids : ${{ steps.artifact.outputs.id }}
21
29
path : ./dist
22
30
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
+
23
42
- name : Upload release asset
24
43
uses : softprops/action-gh-release@v2
25
44
with :
26
- files : ./dist/code-snippets-*.zip
27
- env :
28
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
+ files : ${{ steps.zip.outputs.path }}
29
46
30
47
# deploy:
31
48
# needs: upload
You can’t perform that action at this time.
0 commit comments