Skip to content

Commit

Permalink
feat: add semver generation and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
anujdeshpande committed Jul 31, 2023
1 parent 2c85d92 commit a20c710
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions .github/workflows/build.yml
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
Expand All @@ -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/release-action@v1.12.0
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 }}

0 comments on commit a20c710

Please sign in to comment.