Update README.md #118
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
name: Build AM32 F051 Firmware | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
- name: Install ARM SDK | |
run: make arm_sdk_install | |
- name: Get GitHub Build Number (ENV) | |
id: get_buildno | |
run: echo "GITHUBBUILDNUMBER=${{ github.run_number }}" >> $GITHUB_ENV | |
continue-on-error: true | |
- name: Get Pull Request Number | |
id: get_pullno | |
run: echo "PULL_NUMBER=$(echo "$GITHUB_REF" | awk -F / '{print $3}')" >> $GITHUB_ENV | |
if: startsWith(github.ref, 'refs/pull/') | |
- name: Make artifact name | |
id: make_artifactname | |
run: | | |
ARTIFACT_NAME="AM32-BUILD-${{ github.run_number }}" | |
echo "${ARTIFACT_NAME}" | |
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV | |
- name: Build All Targets | |
run: make all | |
- name: Upload Bin Files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.ARTIFACT_NAME }}-BIN | |
path: obj/*.bin | |
- name: Upload Hex Files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.ARTIFACT_NAME }}-HEX | |
path: obj/*.hex |