forked from zephyrproject-rtos/example-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add semver and release to github workflow
- Loading branch information
1 parent
2c85d92
commit a1fc7a6
Showing
1 changed file
with
38 additions
and
4 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 |
---|---|---|
@@ -1,12 +1,28 @@ | ||
name: Build | ||
name: SemVer Release & Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
types: [opened, synchronize, closed] | ||
branches: main | ||
|
||
jobs: | ||
version: | ||
outputs: | ||
next: ${{steps.semver.outputs.next}} | ||
nextStrict: ${{steps.semver.outputs.nextStrict}} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Next Version | ||
id: semver | ||
uses: ietf-tools/semver-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: main | ||
|
||
build: | ||
runs-on: ubuntu-22.04 | ||
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2 | ||
|
@@ -33,3 +49,21 @@ jobs: | |
working-directory: example-application | ||
run: | | ||
west twister -T tests --integration | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: [version,build] | ||
steps: | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
generateReleaseNotes: true | ||
name: ${{ needs.version.outputs.next }} | ||
body: Changelog Contents | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: "README.md,LICENSE,app/build/zephyr/${{ github.repository }}-${{ needs.version.outputs.nextStrict }}.uf2" | ||
commit: ${{ github.sha }} | ||
tag: ${{ needs.version.outputs.next }} |