Skip to content

Commit

Permalink
chore: ci release & version
Browse files Browse the repository at this point in the history
  • Loading branch information
xVanTuring committed Aug 9, 2024
1 parent 816e3b7 commit 0db4109
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 13 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Pack Addon

on:
push:
branches: [ "dev" ]


jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.10", "3.11" ]
name: "OS ${{ matrix.os }} Python ${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Pack Addon
run: python ./scripts/release.py

- name: Get file name
run: |
echo "FILEPATH=$(Get-ChildItem ./dist/)" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "BASENAME=$($(Get-ChildItem ./dist/).BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh

- name: unzip for artifact
run: Expand-Archive ${{ env.FILEPATH }} -DestinationPath ./tmp/
shell: pwsh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASENAME }}
path: ./tmp


17 changes: 5 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Pack Addon

on:
push:
branches: [ "dev" ]
tags:
- '*
jobs:
Expand All @@ -28,15 +29,7 @@ jobs:
echo "FILEPATH=$(Get-ChildItem ./dist/)" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "BASENAME=$($(Get-ChildItem ./dist/).BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh

- name: unzip for artifact
run: Expand-Archive ${{ env.FILEPATH }} -DestinationPath ./tmp/
shell: pwsh

- name: Upload artifact
uses: actions/upload-artifact@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.BASENAME }}
path: ./tmp


files: ${{ env.FILEPATH }}
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Sublender",
"author": "xVanTuring(@foxmail.com)",
"blender": (2, 80, 0),
"version": (2, 1, 1),
"version": (2, 1, 2),
"location": "View3D > Properties > Sublender",
"description": "An add-on for sbsar",
"tracker_url": "https://github.com/xVanTuring/sublender/issues",
Expand Down

0 comments on commit 0db4109

Please sign in to comment.