sforkowany z mirror/meshtastic-firmware
Update main_matrix.yml
rodzic
b8aac2c5b6
commit
a0a5147c42
|
@ -405,19 +405,26 @@ jobs:
|
|||
|
||||
release-artifacts:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
needs: [gather-artifacts]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
python-version: 3.x
|
||||
|
||||
- name: Get release version string
|
||||
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||
id: version
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v25
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'version.properties')
|
||||
with:
|
||||
name: firmware-${{ steps.version.outputs.version }}
|
||||
path: ./output
|
||||
|
@ -440,7 +447,6 @@ jobs:
|
|||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'version.properties')
|
||||
with:
|
||||
draft: true
|
||||
prerelease: true
|
||||
|
@ -452,7 +458,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Add bins to release
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'version.properties')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
@ -463,7 +468,6 @@ jobs:
|
|||
asset_content_type: application/zip
|
||||
|
||||
- name: Add debug elfs to release
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'version.properties')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
@ -472,3 +476,18 @@ jobs:
|
|||
asset_path: ./debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||
asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Bump version
|
||||
run: >-
|
||||
bin/bump_version.py
|
||||
|
||||
- name: Commit updated version.py
|
||||
id: commit_updated
|
||||
run: |
|
||||
git config --global user.name 'github-actions'
|
||||
git config --global user.email 'bot@noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
||||
git add setup.py
|
||||
git commit -m "bump version" && git push || echo "No changes to commit"
|
||||
git log -n 1 --pretty=format:"%H" | tail -n 1 | awk '{print "::set-output name=sha::"$0}'
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue