mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-05-20 16:28:15 +05:00
chore: update build workflow
This commit is contained in:
@@ -3,17 +3,29 @@ name: Build
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths-ignore: ["assets/**", "tools/**", "**/*.md", "LICENSE"]
|
paths-ignore:
|
||||||
|
- "assets/**"
|
||||||
|
- "tools/**"
|
||||||
|
- "**/*.md"
|
||||||
|
- "LICENSE"
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore: ["assets/**", "tools/**", "**/*.md", "LICENSE"]
|
paths-ignore:
|
||||||
|
- "assets/**"
|
||||||
|
- "tools/**"
|
||||||
|
- "**/*.md"
|
||||||
|
- "LICENSE"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
name: Prepare matrix
|
name: Prepare (get envs)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
envs: ${{ steps.envs.outputs.envs }}
|
envs: ${{ steps.envs.outputs.envs }}
|
||||||
@@ -33,7 +45,8 @@ jobs:
|
|||||||
pip install --upgrade platformio
|
pip install --upgrade platformio
|
||||||
pip install --upgrade intelhex
|
pip install --upgrade intelhex
|
||||||
|
|
||||||
- id: envs
|
- name: Get environments
|
||||||
|
id: envs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ENVS=$(
|
ENVS=$(
|
||||||
@@ -98,3 +111,42 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
build/*.bin
|
build/*.bin
|
||||||
build/*.elf
|
build/*.elf
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Release Dev
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
if: ${{ github.repository_owner == 'Laxilef' && github.ref == 'refs/heads/async' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v5
|
||||||
|
with:
|
||||||
|
path: artifacts
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Delete old release assets
|
||||||
|
uses: mknejp/delete-release-assets@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag: dev
|
||||||
|
fail-if-no-assets: false
|
||||||
|
fail-if-no-release: false
|
||||||
|
assets: |
|
||||||
|
*.bin
|
||||||
|
*.elf
|
||||||
|
|
||||||
|
- name: Publish Dev release
|
||||||
|
uses: softprops/action-gh-release@v3
|
||||||
|
with:
|
||||||
|
tag_name: dev
|
||||||
|
target_commitish: async
|
||||||
|
name: Dev (unstable)
|
||||||
|
prerelease: true
|
||||||
|
make_latest: false
|
||||||
|
generate_release_notes: true
|
||||||
|
files: |
|
||||||
|
artifacts/*.bin
|
||||||
|
artifacts/*.elf
|
||||||
|
|||||||
Reference in New Issue
Block a user