Skip to content

Commit d4c1666

Browse files
committed
linux
1 parent e2b3d1e commit d4c1666

File tree

1 file changed

+184
-184
lines changed

1 file changed

+184
-184
lines changed

.github/workflows/gh-pages.yml

Lines changed: 184 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -55,192 +55,24 @@ jobs:
5555
# with:
5656
# token: ${{ secrets.GITHUB_TOKEN }}
5757

58-
# build-gh-electron:
59-
# # needs: deploy
60-
# runs-on: ubuntu-latest
61-
# strategy:
62-
# matrix:
63-
# # platform: [win]
64-
# platform: [win]
65-
# # platform: [win, mac, linux]
66-
# steps:
67-
# - name: Checkout Code
68-
# uses: actions/checkout@v3
69-
# - name: Install dependencies
70-
# run: npm install
71-
# - name: Install Wine
72-
# run: |
73-
# sudo dpkg --add-architecture i386
74-
# sudo apt update
75-
# sudo apt install -y wine64 wine32
76-
# - name: Build
77-
# run: npm run build
78-
# - name: Build Electron App
79-
# run: |
80-
# case ${{ matrix.platform }} in
81-
# win) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --win;;
82-
# mac) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --mac ;;
83-
# linux) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --linux AppImage ;;
84-
# esac
85-
# - name: Archive Build Outputs
86-
# run: |
87-
# mkdir -p artifacts
88-
# case ${{ matrix.platform }} in
89-
# win) mv dist/*.exe artifacts/ ;;
90-
# mac) mv dist/*.dmg artifacts/ ;;
91-
# linux) mv dist/*.AppImage artifacts/ ;;
92-
# esac
93-
94-
# - name: Upload Build Outputs
95-
# uses: actions/upload-artifact@v3
96-
# with:
97-
# name: ${{ matrix.platform }}-builds
98-
# path: artifacts
99-
100-
# - name: List files in the build directory
101-
# run: ls -l ./dist
102-
103-
# - name: Extract version from package.json
104-
# id: extract_version
105-
# run: |
106-
# VERSION=$(node -p "require('./package.json').version")
107-
# echo "Version extracted: $VERSION"
108-
# echo "::set-output name=version::$VERSION"
109-
# echo "VERSION=$VERSION" >> $GITHUB_ENV
110-
111-
# release:
112-
# needs: build-gh-electron
113-
# runs-on: ubuntu-latest
114-
# strategy:
115-
# matrix:
116-
# # platform: [win]
117-
# platform: [win]
118-
# # platform: [win, mac, linux]
119-
# steps:
120-
# - name: Download Artifacts
121-
# uses: actions/download-artifact@v3
122-
# with:
123-
# name: ${{ matrix.platform }}-builds
124-
# - name: List files in the build directory
125-
# run: ls -l
126-
# - name: Debug VERSION
127-
# run: |
128-
# echo "VERSION is: ${{ env.VERSION }}"
129-
# env:
130-
# VERSION: ${{ env.VERSION }}
131-
# - name: Create GitHub Release
132-
# id: create_release
133-
# uses: actions/create-release@v1
134-
# env:
135-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136-
# VERSION: ${{ env.VERSION }}
137-
# with:
138-
# tag_name: ${{ github.ref_name }}-${{ github.run_id }}
139-
# release_name: Release New Version ${{ env.VERSION }}
140-
# draft: false
141-
# prerelease: false
142-
143-
# - name: Find All Files Matching VERSION
144-
# id: find_files
145-
# run: |
146-
# VERSION=${{ env.VERSION }}
147-
# files=($(ls ./*${VERSION}* 2>/dev/null || echo ""))
148-
# if [ ${#files[@]} -eq 0 ]; then
149-
# echo "Error: No files found matching VERSION ${VERSION}"
150-
# exit 1
151-
# fi
152-
# echo "Found files: ${files[@]}"
153-
# file_list=$(IFS=','; echo "${files[*]}")
154-
# echo "file_list=$file_list" >> $GITHUB_ENV
155-
156-
# - name: Generate Release Assets
157-
# run: |
158-
# echo "Files to upload: ${{ env.file_list }}"
159-
# IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
160-
# for file in "${file_array[@]}"; do
161-
# echo "$file" > asset_files.txt
162-
# echo "Processing file: $file"
163-
# done
164-
# env:
165-
# file_list: ${{ env.file_list }}
166-
167-
# - name: Upload Release Assets
168-
# run: |
169-
# IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
170-
# for file in "${file_array[@]}"; do
171-
# echo "Uploading $file..."
172-
# curl -XPOST \
173-
# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
174-
# -H "Content-Type: application/octet-stream" \
175-
# --data-binary @$file \
176-
# "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$(basename $file)"
177-
# done
178-
# env:
179-
# file_list: ${{ env.file_list }}
180-
181-
# # - name: Upload Release Assets
182-
# # run: |
183-
# # # Loop through the asset files and upload them one by one
184-
# # for file in $(cat asset_files.txt); do
185-
# # echo "Uploading $file..."
186-
# # curl -XPOST \
187-
# # -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
188-
# # -H "Content-Type: application/octet-stream" \
189-
# # --data-binary @$file \
190-
# # "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$file"
191-
# # done
192-
193-
# # - name: Upload Release Assets
194-
# # id: upload-release-asset
195-
# # uses: actions/upload-release-asset@v1
196-
# # with:
197-
# # upload_url: ${{ steps.create_release.outputs.upload_url }} # Use the upload URL from the create-release step
198-
# # asset_path: ${{ env.file_list }} # Adjust the path if necessary
199-
# # asset_name: ${{ env.VERSION }}-asset # Name of the asset to upload
200-
# # asset_content_type: application/octet-stream
201-
# # env:
202-
# # VERSION: ${{ env.VERSION }}
203-
# # file_list: ${{ env.file_list }}
204-
205-
206-
# # - name: Upload Windows Installer
207-
# # uses: actions/upload-release-asset@v1
208-
# # with:
209-
# # upload_url: ${{ steps.create_release.outputs.upload_url }}
210-
# # asset_path: ./artifacts/*.exe
211-
# # asset_name: TxCRCPME-win-v${{ github.run_number }}.exe
212-
# # asset_content_type: application/octet-stream
213-
214-
# # - name: Upload macOS Installer
215-
# # uses: actions/upload-release-asset@v1
216-
# # with:
217-
# # upload_url: ${{ steps.create_release.outputs.upload_url }}
218-
# # asset_path: ./artifacts/*.dmg
219-
# # asset_name: TxCRCPME-mac-v${{ github.run_number }}.dmg
220-
# # asset_content_type: application/octet-stream
221-
222-
# # - name: Upload Linux Installer
223-
# # uses: actions/upload-release-asset@v1
224-
# # with:
225-
# # upload_url: ${{ steps.create_release.outputs.upload_url }}
226-
# # asset_path: ./artifacts/*.AppImage
227-
# # asset_name: TxCRCPME-linux-v${{ github.run_number }}.AppImage
228-
# # asset_content_type: application/octet-stream
229-
230-
231-
build-mac-electron:
232-
# needs: release
233-
runs-on: macos-latest
58+
build-gh-electron:
59+
# needs: deploy
60+
runs-on: ubuntu-latest
23461
strategy:
23562
matrix:
236-
platform: [mac]
63+
# platform: [win]
64+
platform: [win, linux]
65+
# platform: [win, mac, linux]
23766
steps:
23867
- name: Checkout Code
23968
uses: actions/checkout@v3
24069
- name: Install dependencies
24170
run: npm install
242-
- name: Install dmg-license
243-
run: npm install dmg-license
71+
- name: Install Wine
72+
run: |
73+
sudo dpkg --add-architecture i386
74+
sudo apt update
75+
sudo apt install -y wine64 wine32
24476
- name: Build
24577
run: npm run build
24678
- name: Build Electron App
@@ -275,13 +107,15 @@ jobs:
275107
echo "Version extracted: $VERSION"
276108
echo "::set-output name=version::$VERSION"
277109
echo "VERSION=$VERSION" >> $GITHUB_ENV
278-
279-
mac-release:
280-
needs: build-mac-electron
281-
runs-on: macos-latest
110+
111+
release:
112+
needs: build-gh-electron
113+
runs-on: ubuntu-latest
282114
strategy:
283115
matrix:
284-
platform: [mac]
116+
# platform: [win]
117+
platform: [win, linux]
118+
# platform: [win, mac, linux]
285119
steps:
286120
- name: Download Artifacts
287121
uses: actions/download-artifact@v3
@@ -344,6 +178,172 @@ jobs:
344178
env:
345179
file_list: ${{ env.file_list }}
346180

181+
# - name: Upload Release Assets
182+
# run: |
183+
# # Loop through the asset files and upload them one by one
184+
# for file in $(cat asset_files.txt); do
185+
# echo "Uploading $file..."
186+
# curl -XPOST \
187+
# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
188+
# -H "Content-Type: application/octet-stream" \
189+
# --data-binary @$file \
190+
# "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$file"
191+
# done
192+
193+
# - name: Upload Release Assets
194+
# id: upload-release-asset
195+
# uses: actions/upload-release-asset@v1
196+
# with:
197+
# upload_url: ${{ steps.create_release.outputs.upload_url }} # Use the upload URL from the create-release step
198+
# asset_path: ${{ env.file_list }} # Adjust the path if necessary
199+
# asset_name: ${{ env.VERSION }}-asset # Name of the asset to upload
200+
# asset_content_type: application/octet-stream
201+
# env:
202+
# VERSION: ${{ env.VERSION }}
203+
# file_list: ${{ env.file_list }}
204+
205+
206+
# - name: Upload Windows Installer
207+
# uses: actions/upload-release-asset@v1
208+
# with:
209+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
210+
# asset_path: ./artifacts/*.exe
211+
# asset_name: TxCRCPME-win-v${{ github.run_number }}.exe
212+
# asset_content_type: application/octet-stream
213+
214+
# - name: Upload macOS Installer
215+
# uses: actions/upload-release-asset@v1
216+
# with:
217+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
218+
# asset_path: ./artifacts/*.dmg
219+
# asset_name: TxCRCPME-mac-v${{ github.run_number }}.dmg
220+
# asset_content_type: application/octet-stream
221+
222+
# - name: Upload Linux Installer
223+
# uses: actions/upload-release-asset@v1
224+
# with:
225+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
226+
# asset_path: ./artifacts/*.AppImage
227+
# asset_name: TxCRCPME-linux-v${{ github.run_number }}.AppImage
228+
# asset_content_type: application/octet-stream
229+
230+
231+
# build-mac-electron:
232+
# # needs: release
233+
# runs-on: macos-latest
234+
# strategy:
235+
# matrix:
236+
# platform: [mac]
237+
# steps:
238+
# - name: Checkout Code
239+
# uses: actions/checkout@v3
240+
# - name: Install dependencies
241+
# run: npm install
242+
# - name: Install dmg-license
243+
# run: npm install dmg-license
244+
# - name: Build
245+
# run: npm run build
246+
# - name: Build Electron App
247+
# run: |
248+
# case ${{ matrix.platform }} in
249+
# win) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --win;;
250+
# mac) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --mac ;;
251+
# linux) GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run dist -- --linux AppImage ;;
252+
# esac
253+
# - name: Archive Build Outputs
254+
# run: |
255+
# mkdir -p artifacts
256+
# case ${{ matrix.platform }} in
257+
# win) mv dist/*.exe artifacts/ ;;
258+
# mac) mv dist/*.dmg artifacts/ ;;
259+
# linux) mv dist/*.AppImage artifacts/ ;;
260+
# esac
261+
262+
# - name: Upload Build Outputs
263+
# uses: actions/upload-artifact@v3
264+
# with:
265+
# name: ${{ matrix.platform }}-builds
266+
# path: artifacts
267+
268+
# - name: List files in the build directory
269+
# run: ls -l ./dist
270+
271+
# - name: Extract version from package.json
272+
# id: extract_version
273+
# run: |
274+
# VERSION=$(node -p "require('./package.json').version")
275+
# echo "Version extracted: $VERSION"
276+
# echo "::set-output name=version::$VERSION"
277+
# echo "VERSION=$VERSION" >> $GITHUB_ENV
278+
279+
# mac-release:
280+
# needs: build-mac-electron
281+
# runs-on: macos-latest
282+
# strategy:
283+
# matrix:
284+
# platform: [mac]
285+
# steps:
286+
# - name: Download Artifacts
287+
# uses: actions/download-artifact@v3
288+
# with:
289+
# name: ${{ matrix.platform }}-builds
290+
# - name: List files in the build directory
291+
# run: ls -l
292+
# - name: Debug VERSION
293+
# run: |
294+
# echo "VERSION is: ${{ env.VERSION }}"
295+
# env:
296+
# VERSION: ${{ env.VERSION }}
297+
# - name: Create GitHub Release
298+
# id: create_release
299+
# uses: actions/create-release@v1
300+
# env:
301+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
302+
# VERSION: ${{ env.VERSION }}
303+
# with:
304+
# tag_name: ${{ github.ref_name }}-${{ github.run_id }}
305+
# release_name: Release New Version ${{ env.VERSION }}
306+
# draft: false
307+
# prerelease: false
308+
309+
# - name: Find All Files Matching VERSION
310+
# id: find_files
311+
# run: |
312+
# VERSION=${{ env.VERSION }}
313+
# files=($(ls ./*${VERSION}* 2>/dev/null || echo ""))
314+
# if [ ${#files[@]} -eq 0 ]; then
315+
# echo "Error: No files found matching VERSION ${VERSION}"
316+
# exit 1
317+
# fi
318+
# echo "Found files: ${files[@]}"
319+
# file_list=$(IFS=','; echo "${files[*]}")
320+
# echo "file_list=$file_list" >> $GITHUB_ENV
321+
322+
# - name: Generate Release Assets
323+
# run: |
324+
# echo "Files to upload: ${{ env.file_list }}"
325+
# IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
326+
# for file in "${file_array[@]}"; do
327+
# echo "$file" > asset_files.txt
328+
# echo "Processing file: $file"
329+
# done
330+
# env:
331+
# file_list: ${{ env.file_list }}
332+
333+
# - name: Upload Release Assets
334+
# run: |
335+
# IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
336+
# for file in "${file_array[@]}"; do
337+
# echo "Uploading $file..."
338+
# curl -XPOST \
339+
# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
340+
# -H "Content-Type: application/octet-stream" \
341+
# --data-binary @$file \
342+
# "https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$(basename $file)"
343+
# done
344+
# env:
345+
# file_list: ${{ env.file_list }}
346+
347347

348348

349349

0 commit comments

Comments
 (0)