diff --git a/.github/workflows/check.yaml b/.github/workflows/ci.yaml similarity index 94% rename from .github/workflows/check.yaml rename to .github/workflows/ci.yaml index e65aacd..17cb992 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,8 @@ name: ci on: pull_request: branches: [main] + paths: + - 'src/**' jobs: lint: @@ -34,7 +36,7 @@ jobs: source ./aliases.sh chmod +x ./aliases.sh ./aliases.sh - - name: Copy src foldet to sdk + - name: Copy src folder to sdk run: | rsync -a --delete ./src/ ./microbit-v2-sdk/source/ - name: microbuild python diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..7c5b29b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +name: Release Build + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install build dependencies + run: sudo apt install -y gcc python3 cmake gcc-arm-none-eabi binutils-arm-none-eabi + + - name: Run microinstall + run: | + chmod +x microinstall.sh + ./microinstall.sh + + - name: Run microbuild + run: | + chmod +x microbuild.sh + ./microbuild.sh + + - name: Upload MICROBIT.hex artifact + uses: actions/upload-artifact@v4 + with: + name: MICROBIT-hex-${{ github.ref_name }} + path: MICROBIT.hex \ No newline at end of file