Skip to content

Commit e64cfc9

Browse files
kolibril13claude
andcommitted
ci: combine release + extensions upload into one workflow
Merge the separate draft-release and upload-to-extensions workflows into a single tag-triggered release.yml that builds, creates a (non-draft) release, and uploads to the Blender Extensions Platform in one job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c264dde commit e64cfc9

2 files changed

Lines changed: 21 additions & 46 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Build and Create Draft Release
1+
name: Build and Create Release
22

33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
# Cancel in-progress runs when a new workflow with the same group is triggered
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
14-
build-and-draft-release:
14+
build-and-release:
1515
runs-on: macos-latest
1616
permissions:
1717
contents: write
@@ -27,8 +27,23 @@ jobs:
2727
run: |
2828
blender -b -P build.py
2929
30-
- name: Create Draft Release
30+
- name: Create Release
3131
run: |
32-
gh release create ${{ github.ref_name }} --draft --generate-notes *.zip
32+
gh release create ${{ github.ref_name }} --generate-notes *.zip
3333
env:
34-
GITHUB_TOKEN: ${{ github.token }}
34+
GITHUB_TOKEN: ${{ github.token }}
35+
36+
- name: Upload to Extensions Platform
37+
env:
38+
EXTENSION: csv_importer
39+
GITHUB_TOKEN: ${{ github.token }}
40+
run: |
41+
RELEASE_URL=$(gh release view ${{ github.ref_name }} --json url -q .url)
42+
echo "See release notes: ${RELEASE_URL}" > release_notes.txt
43+
for zipfile in *.zip; do
44+
echo "Uploading $zipfile to Blender Extensions Platform"
45+
curl -X POST https://extensions.blender.org/api/v1/extensions/${EXTENSION}/versions/upload/ \
46+
-H "Authorization:bearer ${{ secrets.BLENDER_EXTENSIONS_TOKEN }}" \
47+
-F "version_file=@${zipfile}" \
48+
-F "release_notes=<release_notes.txt"
49+
done

.github/workflows/upload.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)