Skip to content

Commit 6a343d3

Browse files
committed
yml
1 parent d7c54eb commit 6a343d3

File tree

3 files changed

+29
-83
lines changed

3 files changed

+29
-83
lines changed

.github/workflows/gh-pages.yml

Lines changed: 27 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ jobs:
8888
with:
8989
name: ${{ matrix.platform }}-builds
9090
path: artifacts
91-
92-
- name: List files in the build directory
93-
run: ls -l ./dist
9491

9592
- name: Extract version from package.json
9693
id: extract_version
@@ -100,65 +97,9 @@ jobs:
10097
echo "::set-output name=version::$VERSION"
10198
echo "VERSION=$VERSION" >> $GITHUB_ENV
10299
103-
release:
100+
101+
build-electron:
104102
needs: build-electron-win
105-
runs-on: ubuntu-latest
106-
strategy:
107-
matrix:
108-
platform: [win]
109-
steps:
110-
- name: Download Artifacts
111-
uses: actions/download-artifact@v3
112-
with:
113-
name: ${{ matrix.platform }}-builds
114-
- name: List files in the build directory
115-
run: ls -l
116-
- name: Debug VERSION
117-
run: |
118-
echo "VERSION is: ${{ env.VERSION }}"
119-
env:
120-
VERSION: ${{ env.VERSION }}
121-
- name: Create GitHub Release
122-
id: create_release
123-
uses: actions/create-release@v1
124-
env:
125-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126-
VERSION: ${{ env.VERSION }}
127-
with:
128-
tag_name: ${{ github.ref_name }}-${{ github.run_id }}
129-
release_name: Release New Version ${{ env.VERSION }}
130-
draft: false
131-
prerelease: false
132-
133-
- name: Find All Files Matching VERSION
134-
id: find_files
135-
run: |
136-
VERSION=${{ env.VERSION }}
137-
files=($(ls ./*${VERSION}* 2>/dev/null || echo ""))
138-
if [ ${#files[@]} -eq 0 ]; then
139-
echo "Error: No files found matching VERSION ${VERSION}"
140-
exit 1
141-
fi
142-
echo "Found files: ${files[@]}"
143-
file_list=$(IFS=','; echo "${files[*]}")
144-
echo "file_list=$file_list" >> $GITHUB_ENV
145-
146-
- name: Upload Release Assets
147-
run: |
148-
IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
149-
for file in "${file_array[@]}"; do
150-
echo "Uploading $file..."
151-
curl -XPOST \
152-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
153-
-H "Content-Type: application/octet-stream" \
154-
--data-binary @$file \
155-
"https://uploads.github.com/repos/iDataVisualizationLab/TxDOT/releases/${{ steps.create_release.outputs.id }}/assets?name=$(basename $file)"
156-
done
157-
env:
158-
file_list: ${{ env.file_list }}
159-
160-
build-mac-electron:
161-
needs: release
162103
runs-on: macos-latest
163104
strategy:
164105
matrix:
@@ -193,29 +134,34 @@ jobs:
193134
with:
194135
name: ${{ matrix.platform }}-builds
195136
path: artifacts
196-
197-
- name: List files in the build directory
198-
run: ls -l ./dist
199137

200-
- name: Extract version from package.json
201-
id: extract_version
202-
run: |
203-
VERSION=$(node -p "require('./package.json').version")
204-
echo "Version extracted: $VERSION"
205-
echo "::set-output name=version::$VERSION"
206-
echo "VERSION=$VERSION" >> $GITHUB_ENV
207-
208-
mac-release:
209-
needs: build-mac-electron
210-
runs-on: macos-latest
211-
strategy:
212-
matrix:
213-
platform: [mac, linux]
138+
release:
139+
needs: build-electron
140+
runs-on: ubuntu-latest
214141
steps:
215-
- name: Download Artifacts
142+
- name: Download win Artifacts
216143
uses: actions/download-artifact@v3
217144
with:
218-
name: ${{ matrix.platform }}-builds
145+
name: win-builds
146+
- name: Download mac Artifacts
147+
uses: actions/download-artifact@v3
148+
with:
149+
name: mac-builds
150+
- name: Download linux Artifacts
151+
uses: actions/download-artifact@v3
152+
with:
153+
name: linux-builds
154+
- name: Create GitHub Release
155+
id: create_release
156+
uses: actions/create-release@v1
157+
env:
158+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
159+
VERSION: ${{ env.VERSION }}
160+
with:
161+
tag_name: ${{ github.ref_name }}-${{ github.run_id }}
162+
release_name: Release New Version ${{ env.VERSION }}
163+
draft: false
164+
prerelease: false
219165
- name: Find All Files Matching VERSION
220166
id: find_files
221167
run: |
@@ -228,7 +174,6 @@ jobs:
228174
echo "Found files: ${files[@]}"
229175
file_list=$(IFS=','; echo "${files[*]}")
230176
echo "file_list=$file_list" >> $GITHUB_ENV
231-
232177
- name: Upload Release Assets
233178
run: |
234179
IFS=',' read -r -a file_array <<< "${{ env.file_list }}"
@@ -243,6 +188,7 @@ jobs:
243188
env:
244189
file_list: ${{ env.file_list }}
245190

191+
246192

247193

248194

dist/build/static/js/bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/*! For license information please see main.8454027e.js.LICENSE.txt */
1+
/*! For license information please see main.6a518c98.js.LICENSE.txt */

0 commit comments

Comments
 (0)