Skip to content

Commit fe10466

Browse files
authored
Fix sync file upload (#906)
* Fix sync file upload Updated the workflow to copy changed files to an artifact directory instead of listing them. * Preserve `package.json` and `tbump.toml` updates Add steps to upload and download updated package files in CI workflow. * Add missing `env_installer/jlab_server.yaml`
1 parent 96152f0 commit fe10466

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/sync_lab_release.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ jobs:
6060
echo "update_available=false" >> $GITHUB_OUTPUT
6161
fi
6262
63+
- name: Upload updated version spec files
64+
uses: actions/upload-artifact@v4
65+
if: steps.check-update.outputs.update_available == 'true'
66+
with:
67+
name: updated-version-info
68+
path: |
69+
tbump.toml
70+
package.json
71+
env_installer/jlab_server.yaml
72+
if-no-files-found: error
73+
6374
update-files:
6475
needs: check-latest-version
6576
if: needs.check-latest-version.outputs.update_available == 'true'
@@ -73,6 +84,12 @@ jobs:
7384
steps:
7485
- uses: actions/checkout@v4
7586

87+
- name: Download updated version info
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: updated-version-info
91+
path: .
92+
7693
- name: Install Node
7794
uses: actions/setup-node@v4
7895
with:
@@ -105,20 +122,22 @@ jobs:
105122
yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-osx-arm64.lock
106123
yarn update_binary_sign_list --platform osx-arm64
107124
108-
- name: Get changed files
109-
id: changed-files
125+
- name: Copy changed files to artifact directory
110126
run: |
111-
git diff --name-only > changed_files.txt
112-
echo "files<<EOF" >> $GITHUB_OUTPUT
113-
cat changed_files.txt >> $GITHUB_OUTPUT
114-
echo "EOF" >> $GITHUB_OUTPUT
127+
mkdir -p changed-files
128+
changed_files=$(git diff --name-only)
129+
echo "$changed_files" | while read file; do
130+
if [ -f "$file" ]; then
131+
mkdir -p "changed-files/$(dirname "$file")"
132+
cp "$file" "changed-files/$file"
133+
fi
134+
done
115135
116136
- name: Upload updated repo as artifact
117137
uses: actions/upload-artifact@v4
118138
with:
119139
name: updated-repo
120-
path: |
121-
${{ steps.changed-files.outputs.files }}
140+
path: changed-files/
122141
if-no-files-found: error
123142

124143
push-and-pr:
@@ -140,7 +159,7 @@ jobs:
140159
with:
141160
token: ${{ steps.app-token.outputs.token }}
142161

143-
- name: Download updated repo
162+
- name: Download updated lock files and sign lists
144163
uses: actions/download-artifact@v4
145164
with:
146165
name: updated-repo

0 commit comments

Comments
 (0)