mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2025-06-28 02:10:23 +01:00
rename build workflow to release
add ruff workflow
This commit is contained in:
parent
3c77be2ff9
commit
fccef1e2bf
62
.github/workflows/build.yml
vendored
62
.github/workflows/build.yml
vendored
@ -1,62 +0,0 @@
|
|||||||
name: Build PYZ
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*.*.*'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
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: pyz_build
|
|
||||||
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: pyz_build
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: tree
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: simple-recorder.pyz
|
|
||||||
fail_on_unmatched_files: true
|
|
||||||
prerelease: ${{ contains(github.ref, '-') }}
|
|
26
.github/workflows/publish.yml
vendored
Normal file
26
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Publish to PyPI
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pypi-publish:
|
||||||
|
name: upload release to PyPI
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: pypi
|
||||||
|
permissions:
|
||||||
|
# This permission is needed for private repositories.
|
||||||
|
contents: read
|
||||||
|
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||||
|
id-token: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: pdm-project/setup-pdm@v4
|
||||||
|
|
||||||
|
- name: Publish package distributions to PyPI
|
||||||
|
run: pdm publish
|
68
.github/workflows/release.yml
vendored
68
.github/workflows/release.yml
vendored
@ -1,26 +1,62 @@
|
|||||||
name: Release
|
name: Release PYZ
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
pull_request:
|
||||||
pypi-publish:
|
branches: [main]
|
||||||
name: upload release to PyPI
|
|
||||||
runs-on: ubuntu-latest
|
workflow_dispatch:
|
||||||
environment: pypi
|
|
||||||
permissions:
|
permissions:
|
||||||
# This permission is needed for private repositories.
|
contents: write
|
||||||
contents: read
|
|
||||||
# IMPORTANT: this permission is mandatory for trusted publishing
|
jobs:
|
||||||
id-token: write
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: pdm-project/setup-pdm@v4
|
- name: Set up PDM
|
||||||
|
uses: pdm-project/setup-pdm@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Publish package distributions to PyPI
|
- name: Install dependencies
|
||||||
run: pdm publish
|
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: pyz_build
|
||||||
|
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: pyz_build
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: tree
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: simple-recorder.pyz
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
prerelease: ${{ contains(github.ref, '-') }}
|
||||||
|
17
.github/workflows/ruff.yml
vendored
Normal file
17
.github/workflows/ruff.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Ruff
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ruff:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: astral-sh/ruff-action@v3
|
Loading…
x
Reference in New Issue
Block a user