2022-03-26 22:34:01 +00:00
|
|
|
name: Create new release
|
2022-03-26 22:26:42 +00:00
|
|
|
|
2020-08-01 09:00:09 +00:00
|
|
|
on:
|
2022-04-06 21:50:55 +00:00
|
|
|
workflow_dispatch:
|
2020-08-01 09:00:09 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-04-07 09:01:31 +00:00
|
|
|
version_check:
|
|
|
|
name: Version Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-02-19 09:58:26 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-04-07 09:01:31 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
- run: pip install GitPython
|
|
|
|
- name: check version
|
|
|
|
run: ./scripts/check_version.py
|
|
|
|
|
|
|
|
create_release:
|
|
|
|
needs: version_check
|
2022-03-26 22:34:01 +00:00
|
|
|
name: Create new release
|
2020-08-01 09:00:09 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-19 09:58:26 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-01 09:00:09 +00:00
|
|
|
- run: sudo apt-get install python3-setuptools python3-wheel
|
|
|
|
- run: pip3 install platformio
|
2020-12-06 21:14:56 +00:00
|
|
|
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
2020-08-01 09:00:09 +00:00
|
|
|
- run: platformio run
|
2022-03-26 22:34:01 +00:00
|
|
|
- run: echo "VERSION=$(./scripts/create_version_tag.py)" >> $GITHUB_ENV
|
2022-03-26 22:26:42 +00:00
|
|
|
- uses: ncipollo/release-action@v1
|
2020-12-17 21:37:05 +00:00
|
|
|
with:
|
2022-03-26 22:26:42 +00:00
|
|
|
tag: ${{ env.VERSION }}
|
2022-03-26 22:55:35 +00:00
|
|
|
commit: master
|
2022-03-26 22:26:42 +00:00
|
|
|
generateReleaseNotes: true
|
|
|
|
artifacts: ".pio/build/lora_board/firmware.bin,data/is-cfg.json"
|
2022-03-28 18:26:42 +00:00
|
|
|
owner: ${{ secrets.OWNER }}
|
|
|
|
token: ${{ secrets.PAT }}
|