@@ -4,8 +4,9 @@ permissions:
44 contents : write
55
66env :
7- PRODUCT_NAME : ' AIRI'
87 BUNDLE_NAME : ' '
8+ PRODUCT_NAME : ' AIRI'
9+ VERSION : ' '
910
1011on :
1112 release :
@@ -40,32 +41,32 @@ jobs:
4041 - os : macos-13
4142 artifact : darwin-x64
4243 target : x86_64-apple-darwin
44+ arch : x64
4345 builder-args : --macos --x64
44- ext : dmg
4546
4647 - os : macos-latest
4748 artifact : darwin-arm64
4849 target : aarch64-apple-darwin
4950 builder-args : --macos --arm64
50- ext : dmg
51+ arch : arm64
5152
5253 - os : ubuntu-latest
5354 artifact : linux-x64
5455 target : x86_64-unknown-linux-gnu
5556 builder-args : --linux --x64
56- ext : AppImage
57+ arch : x64
5758
5859 - os : ubuntu-24.04-arm
5960 artifact : linux-arm64
6061 target : aarch64-unknown-linux-gnu
6162 builder-args : --linux --arm64
62- ext : AppImage
63+ arch : arm64
6364
6465 - os : windows-latest
6566 artifact : windows-x64-setup
6667 target : x86_64-pc-windows-msvc
6768 builder-args : --windows --x64
68- ext : exe
69+ arch : x64
6970
7071 runs-on : ${{ matrix.os }}
7172 steps :
@@ -108,58 +109,95 @@ jobs:
108109 # ---------
109110 # Nightly (schedule) builds only
110111 # ---------
111- - name : Get Name of Artifacts (Nightly + Windows Only)
112+
113+ - name : Get Artifacts Envs (Nightly + Windows Only)
112114 if : ${{ github.event_name == 'schedule' && matrix.os == 'windows-latest' }}
113115 run : |
114- pnpm -F @proj-airi/stage-tamagotchi name-of- artifacts ${{ matrix.target }} --out bundle_name
115- echo "BUNDLE_NAME =$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', ' stage-tamagotchi', 'bundle_name')).toString('utf-8')" )" >> $env:GITHUB_ENV
116+ echo "BUNDLE_NAME=$( pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-bundle-name)" >> $env:GITHUB_ENV
117+ echo "VERSION =$(pnpm -F @proj-airi/ stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-version )" >> $env:GITHUB_ENV
116118
117- - name : Get Name of Artifacts (Nightly)
119+ - name : Get Artifacts Envs (Nightly + Non-Windows )
118120 if : ${{ github.event_name == 'schedule' && matrix.os != 'windows-latest' }}
119121 run : |
120- pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name
121- echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $GITHUB_ENV
122+ echo "VERSION=$(pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-version)" >> $GITHUB_ENV
123+
124+ - name : Get Artifacts Envs (Nightly + macOS Only)
125+ if : ${{ github.event_name == 'schedule' && (matrix.os == 'macos-latest' || matrix.os == 'macos-13') }}
126+ run : |
127+ echo "BUNDLE_NAME=$(pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-bundle-name)" >> $GITHUB_ENV
122128
123129 - name : Rename Artifacts (Nightly)
124130 if : ${{ github.event_name == 'schedule' }}
125131 run :
126132 pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }}
127133
128- - name : Upload Artifacts (Nightly)
129- if : ${{ github.event_name == 'schedule' }}
134+ - name : Upload Artifacts (Nightly + Non-Linux )
135+ if : ${{ github.event_name == 'schedule' && (matrix.os != 'ubuntu-latest' && matrix.os != 'ubuntu-24.04-arm') }}
130136 uses : actions/upload-artifact@v4
131137 with :
132138 name : ${{ env.BUNDLE_NAME }}
133139 path : apps/stage-tamagotchi/bundle/${{ env.BUNDLE_NAME }}
134140
135- # ---------
136- # Workflow Dispatch only
137- # ---------
141+ - name : Upload Artifacts (Nightly + Linux deb)
142+ if : ${{ github.event_name == 'schedule' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
143+ uses : actions/upload-artifact@v4
144+ with :
145+ name : ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
146+ path : apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
147+
148+ - name : Upload Artifacts (Nightly + Linux rpm)
149+ if : ${{ github.event_name == 'schedule' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
150+ uses : actions/upload-artifact@v4
151+ with :
152+ name : ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
153+ path : apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
154+
155+ # ---------
156+ # Workflow Dispatch only
157+ # ---------
138158
139- - name : Get Name of Artifacts (Manual + Windows Only)
159+ - name : Get Artifacts Envs (Manual + Windows Only)
140160 if : ${{ github.event_name == 'workflow_dispatch' && matrix.os == 'windows-latest' }}
141161 run : |
142- pnpm -F @proj-airi/stage-tamagotchi name-of- artifacts ${{ matrix.target }} --out bundle_name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
143- echo "BUNDLE_NAME =$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')" )" >> $env:GITHUB_ENV
162+ echo "BUNDLE_NAME=$( pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-bundle-name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }})" >> $env:GITHUB_ENV
163+ echo "VERSION =$(pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-version --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }} )" >> $env:GITHUB_ENV
144164
145- - name : Get Name of Artifacts (Manual)
165+ - name : Get Artifacts Envs (Manual + Non-Windows )
146166 if : ${{ github.event_name == 'workflow_dispatch' && matrix.os != 'windows-latest' }}
147167 run : |
148- pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
149- echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $GITHUB_ENV
168+ echo "VERSION=$(pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-version --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }})" >> $GITHUB_ENV
169+
170+ - name : Get Artifacts Envs (Manual + macOS Only)
171+ if : ${{ github.event_name == 'workflow_dispatch' && (matrix.os == 'macos-latest' || matrix.os == 'macos-13') }}
172+ run : |
173+ echo "BUNDLE_NAME=$(pnpm -F @proj-airi/stage-tamagotchi artifacts-metadata ${{ matrix.target }} --get-bundle-name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }})" >> $GITHUB_ENV
150174
151175 - name : Rename Artifacts (Manual)
152176 if : ${{ github.event_name == 'workflow_dispatch' }}
153177 run : |
154178 pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }} --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
155179
156- - name : Upload Artifacts (Manual + Non-Release)
157- if : ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only }}
180+ - name : Upload Artifacts (Manual + Non-Release + Non-Linux )
181+ if : ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os != 'ubuntu-latest' && matrix.os != 'ubuntu-24.04-arm') }}
158182 uses : actions/upload-artifact@v4
159183 with :
160184 name : ${{ env.BUNDLE_NAME }}
161185 path : apps/stage-tamagotchi/bundle/${{ env.BUNDLE_NAME }}
162186
187+ - name : Upload Artifacts (Manual + Non-Release + Linux deb)
188+ if : ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
189+ uses : actions/upload-artifact@v4
190+ with :
191+ name : ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
192+ path : apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
193+
194+ - name : Upload Artifacts (Manual + Non-Release + Linux rpm)
195+ if : ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
196+ uses : actions/upload-artifact@v4
197+ with :
198+ name : ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
199+ path : apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
200+
163201 - name : Upload To GitHub Releases (Manual + Overwrite Release)
164202 if : ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && !inputs.artifacts_only }}
165203 uses : softprops/action-gh-release@v2
0 commit comments