Skip to content

Commit bc1c05b

Browse files
committed
update actions to latest version
1 parent 6edb84b commit bc1c05b

2 files changed

Lines changed: 57 additions & 15 deletions

File tree

.github/workflows/release.yml

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

33
on:
44
push:
55
tags:
66
- 'v*'
77

8+
# Cancel in-progress runs when a new workflow with the same group is triggered
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
813
jobs:
9-
build-and-release:
10-
runs-on: ubuntu-latest
14+
build-and-draft-release:
15+
runs-on: macos-latest
1116
permissions:
1217
contents: write
13-
18+
discussions: write
19+
1420
steps:
15-
- uses: actions/checkout@v4
16-
- uses: BradyAJohnston/setup-blender@v3
21+
- uses: actions/checkout@v5
22+
- uses: BradyAJohnston/setup-blender@v5
1723
with:
18-
version: 4.2
19-
- name: Install uv
20-
uses: astral-sh/setup-uv@v4
21-
with:
22-
version: "latest"
24+
version: 4.5
25+
2326
- name: Build Extension
2427
run: |
2528
blender -b -P build.py
2629
27-
- name: Create Release
30+
- name: Create Draft Release
2831
run: |
29-
# Create release with auto-generated notes
30-
gh release create ${{ github.ref_name }} --generate-notes *.zip
32+
gh release create ${{ github.ref_name }} --draft --generate-notes *.zip
3133
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/upload.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Upload to Extensions Platform
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
# Cancel in-progress runs when a new workflow with the same group is triggered
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
upload-to-extensions:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Download Release Assets and Create Notes
22+
run: |
23+
mkdir assets
24+
gh release download -p "*.zip" -D assets/
25+
RELEASE_URL=$(gh release view --json url | jq -r .url)
26+
echo "See release notes: ${RELEASE_URL}" > release_notes.txt
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Upload to Extensions Platform
31+
env:
32+
EXTENSION: molecularnodes
33+
run: |
34+
for zipfile in assets/*.zip; do
35+
echo "Uploading $zipfile to Blender Extensions Platform"
36+
curl -X POST https://extensions.blender.org/api/v1/extensions/${EXTENSION}/versions/upload/ \
37+
-H "Authorization:bearer ${{ secrets.BLENDER_EXTENSIONS_TOKEN }}" \
38+
-F "version_file=@${zipfile}" \
39+
-F "release_notes=<release_notes.txt"
40+
done

0 commit comments

Comments
 (0)