@@ -13,86 +13,70 @@ jobs:
1313 build-release :
1414 name : Build release
1515 uses : ./.github/workflows/main.yml
16- create-release :
17- name : Create Release
16+ process-artifacts :
17+ name : Process Release Artifacts
1818 runs-on : ubuntu-latest
1919 needs : build-release
20+ strategy :
21+ matrix :
22+ platform : [linux-x86_64, linux-x86_64-ffmpeg, linux-x86, windows-x64, windows-x64-ffmpeg, win-arm64]
2023 steps :
21- - name : Checkout code
22- uses : actions/checkout@v2
23- - name : Archive Linux zip results
24+ - name : Download artifact
2425 uses : actions/download-artifact@v4
25- env :
26- PLATFORM : linux-x86_64
2726 with :
28- name : ${{ env.REPO_NAME }}-release-${{ env.PLATFORM }}
27+ name : ${{ env.REPO_NAME }}-release-${{ matrix.platform }}
2928 path : ./
30- - name : Create Linux release
31- env :
32- PLATFORM : linux-x86_64
29+ - name : Rename artifact
3330 shell : bash
34- run :
35- mv $REPO_NAME-release-$PLATFORM.zip $REPO_NAME-${{ github.ref_name }}-$PLATFORM.zip
36- - name : Upload linux release
37- env :
38- PLATFORM : linux-x86_64
31+ run : |
32+ mv ${{ env.REPO_NAME }}-release-${{ matrix.platform }}.zip ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}.zip
33+ - name : Upload renamed artifact
3934 uses : actions/upload-artifact@v4
4035 with :
41- name : ${{ env.REPO_NAME }}-${{ env.ref_name }}-${{ github.PLATFORM }}
42- path : ${{ env.REPO_NAME }}-${{ env.ref_name }}-{{ github.PLATFORM }}.zip
43-
44- - name : Archive Windows zip results
45- uses : actions/download-artifact@v4
46- env :
47- PLATFORM : windows-x64
48- with :
49- name : ${{ env.REPO_NAME }}-release-${{ env.PLATFORM }}
50- path : ./
51- - name : Create Windows release
52- env :
53- PLATFORM : windows-x64
54- shell : bash
55- run :
56- mv $REPO_NAME-release-$PLATFORM.zip $REPO_NAME-${{ github.ref_name }}-$PLATFORM.zip
57- - name : Upload Windows release
58- uses : actions/upload-artifact@v4
59- env :
60- PLATFORM : windows-x64
61- with :
62- name : ${{ env.REPO_NAME }}-${{ env.ref_name }}-${{ github.PLATFORM }}
63- path : ${{ env.REPO_NAME }}-${{ env.ref_name }}-{{ github.PLATFORM }}.zip
36+ name : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}
37+ path : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}.zip
6438
39+ create-release :
40+ name : Create Release
41+ runs-on : ubuntu-latest
42+ needs : process-artifacts
43+ outputs :
44+ upload_url : ${{ steps.create_release.outputs.upload_url }}
45+ steps :
46+ - name : Checkout code
47+ uses : actions/checkout@v2
6548 - name : Create Release
6649 id : create_release
6750 uses : actions/create-release@v1
6851 env :
69- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7053 with :
7154 tag_name : release-${{ github.ref_name }}
7255 release_name : ${{ env.PRETTY_NAME }} ${{ github.ref_name }}
7356 body : |
7457 ${{ env.PRETTY_NAME }}-${{ github.ref_name }} has been released. You can find details [here](https://github.com/dabrain34/${{ env.PRETTY_NAME }}/blob/main/Changelog.md)
7558 draft : false
7659 prerelease : false
77- - name : Upload Linux Release Asset
78- id : upload-linux-x86_64-release-asset
79- uses : actions/upload-release-asset@v1
80- env :
81- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82- PLATFORM : linux-x86_64
60+
61+ upload-assets :
62+ name : Upload Release Assets
63+ runs-on : ubuntu-latest
64+ needs : create-release
65+ strategy :
66+ matrix :
67+ platform : [linux-x86_64, linux-x86_64-ffmpeg, linux-x86, windows-x64, windows-x64-ffmpeg, win-arm64]
68+ steps :
69+ - name : Download artifact
70+ uses : actions/download-artifact@v4
8371 with :
84- upload_url : ${{ steps.create_release.outputs.upload_url }}
85- asset_path : ./${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
86- asset_name : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
87- asset_content_type : application/zip
88- - name : Upload Windows Release Asset
89- id : upload-win64-release-asset
72+ name : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}
73+ path : ./
74+ - name : Upload Release Asset
9075 uses : actions/upload-release-asset@v1
9176 env :
9277 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
93- PLATFORM : windows-x64
9478 with :
95- upload_url : ${{ steps.create_release .outputs.upload_url }}
96- asset_path : ./${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
97- asset_name : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
79+ upload_url : ${{ needs.create-release .outputs.upload_url }}
80+ asset_path : ./${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}.zip
81+ asset_name : ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ matrix.platform }}.zip
9882 asset_content_type : application/zip
0 commit comments