mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2025-06-27 09:50:23 +01:00
add build workflow
This commit is contained in:
parent
430aaf5cc5
commit
5cff6e268a
59
.github/workflows/build.yml
vendored
Normal file
59
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
name: Build Addon
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up PDM
|
||||
uses: pdm-project/setup-pdm@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pdm sync -d -G build
|
||||
|
||||
- name: Build addon
|
||||
run: pdm run compile
|
||||
|
||||
- name: Upload build artifacts
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packaged_addon
|
||||
path: bin/simple-recorder.pyz
|
||||
|
||||
upload_release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Download releases files
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: packaged_addon
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: tree
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: bin/simple-recorder.pyz
|
||||
fail_on_unmatched_files: true
|
||||
prerelease: ${{ contains(github.ref, '-') }}
|
Loading…
x
Reference in New Issue
Block a user