From aaa2f75fa76ad22c82ac09ae23f08b0505e88fea Mon Sep 17 00:00:00 2001 From: Jakub Smejkal Date: Wed, 13 Oct 2021 20:14:28 +0200 Subject: [PATCH] GitHub Actions added --- .github/workflows/main.yml | 40 ++++++++++++++++++++++ .travis.yml | 19 ----------- README.md | 70 +++++++++++++++++++------------------- requirements.txt | 1 + 4 files changed, 76 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml create mode 100644 requirements.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b8e6abf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: build + +on: + push: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install Python dependencies + uses: py-actions/py-dependency-install@v2 + with: + path: "requirements.txt" + update-pip: "true" + update-setuptools: "false" + update-wheel: "false" + + - name: Compile + run: pio run -e release + + - name: Set env + if: ${{ github.event_name == 'release' }} + run: | + echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + echo "REPOSITORY_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + mv .pio/build/release/firmware.bin ${GITHUB_REPOSITORY##*/}-${GITHUB_REF#refs/*/}.bin + + - name: Release + if: ${{ github.event_name == 'release' }} + uses: softprops/action-gh-release@v0.1.5 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + files: ${{ env.REPOSITORY_NAME }}-${{ env.GITHUB_TAG }}.bin \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6616c11..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: python -env: - - VERSION=${TRAVIS_TAG:-vdev} -install: - - pip install -U platformio -script: - - export PLATFORMIO_BUILD_FLAGS="-D'VERSION=\"${VERSION}\"'" - - pio run -e release - - mv .pio/build/release/firmware.bin twr-skeleton-${VERSION}.bin - - ls -lha -deploy: - skip_cleanup: true - file_glob: true - file: ./*.bin - api_key: ${GITHUB_KEY} - provider: releases - overwrite: true - on: - tags: true diff --git a/README.md b/README.md index 0942ee4..87bc53f 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ -HARDWARIO Logo - -# Firmware for HARDWARIO Sigfox Pulse Counter - -[![Travis](https://img.shields.io/travis/bigclownlabs/bcf-sigfox-pulse-counter/master.svg)](https://travis-ci.org/bigclownlabs/bcf-sigfox-pulse-counter) -[![Release](https://img.shields.io/github/release/bigclownlabs/bcf-sigfox-pulse-counter.svg)](https://github.com/bigclownlabs/bcf-sigfox-pulse-counter/releases) -[![License](https://img.shields.io/github/license/bigclownlabs/bcf-sigfox-pulse-counter.svg)](https://github.com/bigclownlabs/bcf-sigfox-pulse-counter/blob/master/LICENSE) -[![Twitter](https://img.shields.io/twitter/follow/hardwario_en.svg?style=social&label=Follow)](https://twitter.com/hardwario_en) - -This repository contains firmware for sigfox pulse counter project. - -If you want to get more information about, firmware and how to work with it, please follow this link: - -**https://developers.hardwario.com/firmware/firmware-quick-start** - -## Introduction - -Sigfox pulse counter to be used as a wireles counter. Device running from two AAA batteries. It reports measured data to Sigfox network every 60 minutes. - -## Hardware - -The following hardware components are used for this project: - -* **[Sensor Module](https://shop.bigclown.com/products/sensor-module)** -* **[Core Module](https://shop.bigclown.com/products/core-module)** -* **[Sigfox Module](https://shop.bigclown.com/products/sigfox-module)** -* **[Mini Battery Module](https://shop.bigclown.com/products/mini-battery-module)** - -## License - -This project is licensed under the [MIT License](https://opensource.org/licenses/MIT/) - see the [LICENSE](LICENSE) file for details. - ---- - -Made with ❤  by [**HARDWARIO s.r.o.**](https://www.hardwario.com/) in the heart of Europe. +HARDWARIO Logo + +# Firmware for HARDWARIO Sigfox Pulse Counter + +[![build](https://github.com/hardwario/twr-sigfox-pulse-counter/actions/workflows/main.yml/badge.svg)](https://github.com/hardwario/twr-sigfox-pulse-counter/actions/workflows/main.yml) +[![Release](https://img.shields.io/github/release/bigclownlabs/bcf-sigfox-pulse-counter.svg)](https://github.com/bigclownlabs/bcf-sigfox-pulse-counter/releases) +[![License](https://img.shields.io/github/license/bigclownlabs/bcf-sigfox-pulse-counter.svg)](https://github.com/bigclownlabs/bcf-sigfox-pulse-counter/blob/master/LICENSE) +[![Twitter](https://img.shields.io/twitter/follow/hardwario_en.svg?style=social&label=Follow)](https://twitter.com/hardwario_en) + +This repository contains firmware for sigfox pulse counter project. + +If you want to get more information about, firmware and how to work with it, please follow this link: + +**https://developers.hardwario.com/firmware/firmware-quick-start** + +## Introduction + +Sigfox pulse counter to be used as a wireles counter. Device running from two AAA batteries. It reports measured data to Sigfox network every 60 minutes. + +## Hardware + +The following hardware components are used for this project: + +* **[Sensor Module](https://shop.bigclown.com/products/sensor-module)** +* **[Core Module](https://shop.bigclown.com/products/core-module)** +* **[Sigfox Module](https://shop.bigclown.com/products/sigfox-module)** +* **[Mini Battery Module](https://shop.bigclown.com/products/mini-battery-module)** + +## License + +This project is licensed under the [MIT License](https://opensource.org/licenses/MIT/) - see the [LICENSE](LICENSE) file for details. + +--- + +Made with ❤  by [**HARDWARIO s.r.o.**](https://www.hardwario.com/) in the heart of Europe. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a91b030 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +platformio \ No newline at end of file