forked from SodaqMoja/Sodaq_DS3231
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sara Damiano <[email protected]>
- Loading branch information
Showing
7 changed files
with
84 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build Examples | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_examples: | ||
name: Build all examples with PlatformIO and the Arduino CLI | ||
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }} | ||
uses: EnviroDIY/workflows/.github/workflows/build_examples.yaml@main | ||
with: | ||
boards_to_build: 'all' | ||
examples_to_build: 'examples/now, examples/temperature, examples/adjust, examples/PCsync' | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: pull_request | ||
name: Changelog Reminder | ||
jobs: | ||
remind: | ||
name: Changelog Reminder | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
|
||
- name: Changelog Reminder | ||
uses: peterjgrainger/[email protected] | ||
with: | ||
changelog_regex: '/CHANGELOG\/.*\/*.md/i' | ||
customPrMessage: 'Please add your changes to the change log!' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,60 +7,41 @@ on: | |
- 'VERSION' # Push events when the VERSION file changes | ||
workflow_dispatch: | ||
|
||
name: Prepare a new release and add release assets | ||
name: Create a New Release | ||
|
||
env: | ||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
name: Prepare a new release | ||
wait_for_checks: | ||
if: ${{ github.event_name != 'workflow_dispatch' }} | ||
strategy: | ||
matrix: | ||
req_workflow: | ||
[ | ||
verify_library_structure.yaml, | ||
build_examples.yaml, | ||
] | ||
name: Wait for Checks to complete | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set environment variable for current library version | ||
run: | | ||
echo "::debug::Get the current version number" | ||
VER=$(cat VERSION) | ||
ZIP_FILE="ModularSensors_Dependencies_${VER}" | ||
echo "VERSION=$VER" >> $GITHUB_ENV | ||
echo "ZIP_NAME=$ZIP_FILE" >> $GITHUB_ENV | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install PlatformIO | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade platformio | ||
- name: Get notes | ||
id: generate_notes | ||
uses: anmarkoulis/commitizen-changelog-reader@master | ||
with: | ||
# NOTE: Need to add the refs/tags to work with the generate notes action | ||
tag_name: ${{ format('refs/tags/{0}', env.VERSION) }} | ||
changelog: ChangeLog.md | ||
|
||
# Create a new release | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Wait on Workflow | ||
uses: ArcticLampyrid/[email protected] | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
release_name: ${{ env.VERSION }} | ||
draft: false | ||
prerelease: false | ||
body: ${{join(fromJson(steps.generate_notes.outputs.notes).notes, '')}} | ||
workflow: ${{ matrix.req_workflow }} | ||
sha: ${{ github.sha || github.event.pull_request.head.sha || github.event.pull_request.head.ref }} # optional | ||
allowed-conclusions: | | ||
success | ||
cancelled | ||
skipped | ||
# Publish the new release to the pio package manager | ||
- name: Publish release to PIO | ||
id: publish-pio | ||
run: pio package publish | ||
release: | ||
name: Prepare a new release | ||
needs: [wait_for_checks] | ||
if: | | ||
always() && | ||
(needs.wait_for_checks.result == 'success' || needs.wait_for_checks.result == 'skipped') | ||
uses: EnviroDIY/workflows/.github/workflows/prepare_release.yaml@main | ||
secrets: inherit | ||
with: | ||
include_dependencies: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Verify library manifest and structure | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify_library_structure: | ||
name: Validate library structure | ||
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }} | ||
uses: EnviroDIY/workflows/.github/workflows/verify_library_structure.yaml@main | ||
with: | ||
library-manager: 'update' | ||
library-compliance: 'permissive' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters