-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.42 KB
/
Copy pathrelease.yml
File metadata and controls
49 lines (42 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Create Release
on:
push:
tags:
- "v*"
# Cancel in-progress runs when a new workflow with the same group is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-release:
runs-on: macos-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v5
- uses: BradyAJohnston/setup-blender@v5
with:
version: 4.5
- name: Build Extension
run: |
blender -b -P build.py
- name: Create Release
run: |
gh release create ${{ github.ref_name }} --generate-notes *.zip
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload to Extensions Platform
env:
EXTENSION: csv_importer
GITHUB_TOKEN: ${{ github.token }}
run: |
RELEASE_URL=$(gh release view ${{ github.ref_name }} --json url -q .url)
echo "See release notes: ${RELEASE_URL}" > release_notes.txt
for zipfile in *.zip; do
echo "Uploading $zipfile to Blender Extensions Platform"
curl -X POST https://extensions.blender.org/api/v1/extensions/${EXTENSION}/versions/upload/ \
-H "Authorization:bearer ${{ secrets.BLENDER_EXTENSIONS_TOKEN }}" \
-F "version_file=@${zipfile}" \
-F "release_notes=<release_notes.txt"
done