Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Dec 21, 2024
1 parent c292c7d commit 408a270
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release-step-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
$PYTHON $GITHUB_WORKSPACE/scripts/pre-release-checks.py
- name: Tagging
- name: Ensure tagging on latest commit
shell: bash
env:
TAG: ${{ env.TAG }}
Expand All @@ -68,7 +68,7 @@ jobs:
git tag "$TAG"
git push origin "$TAG"
- name: Ensure draft release exists and set upload_url
- name: Ensure a draft release exists
id: release_vars
uses: actions/github-script@v7
env:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
console.log(`release_id: ${release_id}`);
core.setOutput("upload_url", upload_url);
- name: Attach assets
- name: Attach/Update assets with latest in dist/
uses: actions/github-script@v7
env:
UPLOAD_URL: ${{ steps.release_vars.outputs.upload_url }}
Expand All @@ -168,6 +168,9 @@ jobs:
const release_id = process.env.RELEASE_ID;
const dist_dir = path.join(process.env.GITHUB_WORKSPACE, 'dist');
console.log(`upload_url: ${upload_url}`);
console.log(`release_id: ${release_id}`);
const files = fs.readdirSync(dist_dir);
for (const file of files) {
const filePath = path.join(dist_dir, file);
Expand All @@ -191,6 +194,8 @@ jobs:
}
// Upload the new asset
console.log(`Uploading asset: ${filePath}`);
await github.rest.repos.uploadReleaseAsset({
url: upload_url,
headers: {
Expand Down

0 comments on commit 408a270

Please sign in to comment.