Merge pull request #1100 from pennam/release-tag #37
Workflow file for this run
This file contains hidden or 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: release | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+*" | |
| jobs: | |
| core-release-from-tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name : Get the toolchain | |
| run: | | |
| wget -O /opt/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 https://developer.arm.com/-/media/files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | |
| tar -xjf /opt/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 -C /opt/ | |
| - name: Setup build tools | |
| run: | | |
| sudo apt-get install -y python3 python3-pip git mercurial | |
| mkdir /opt/mbed_env | |
| python -m venv /opt/mbed_env/ | |
| source /opt/mbed_env/bin/activate | |
| python3 -m pip install -r extras/requirements.txt | |
| python3 -m pip install mbed-cli setuptools | |
| python3 -m pip install --upgrade six | |
| mbed config -G GCC_ARM_PATH /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ | |
| - name: Set core version | |
| run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Get repo name | |
| run: echo "REPOSITORY_NAME=$(echo ${{ github.repository }} | cut -d "/" -f2-)" >> $GITHUB_ENV | |
| - name: Build the core | |
| run: | | |
| source /opt/mbed_env/bin/activate | |
| export PATH=$PATH:/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ | |
| extras/package_full.sh $TAG_VERSION | |
| - name: Save core packages as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArduinoCore-mbed-packages | |
| path: /home/runner/work/ArduinoCore-mbed/*.tar.bz2 | |
| - name: Save core json as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ArduinoCore-mbed-json | |
| path: /home/runner/work/ArduinoCore-mbed/*.json |