fix workflow yml #major #5
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 & Release with Code Composer Studio IDE | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.4 | |
- name: Build with Code Composer Studio IDE Debug Build Type | |
uses: uoohyo/action-ccstudio-ide@v1.0.0 | |
with: | |
project-path: 'action-28377s-cpu1' | |
project-name: 'action-28377s-cpu1' | |
build-config: 'Debug' | |
components: 'PF_C28' | |
- name: Build with Code Composer Studio IDE Release Build Type | |
uses: uoohyo/action-ccstudio-ide@v1.0.0 | |
with: | |
project-path: 'action-28377s-cpu1' | |
project-name: 'action-28377s-cpu1' | |
build-config: 'Release' | |
components: 'PF_C28' | |
- name: Upload Artifacts for Debug | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Debug-Artifact | |
path: './action-28377s-cpu1/Debug/action-28377s-cpu1.out' | |
- name: Upload Artifacts for Release | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release-Artifact | |
path: './action-28377s-cpu1/Release/action-28377s-cpu1.out' | |
release: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.4 | |
- name: Download Debug Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Debug-Artifact | |
path: './Debug/' | |
- name: Download Release Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Release-Artifact | |
path: './Release/' | |
- name: Bump version and push tag | |
id: tag_version | |
uses: anothrNick/github-tag-action@1.67.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEFAULT_BUMP: patch | |
WITH_V: true | |
RELEASE_BRANCHES: main | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
- name: Upload Release Asset Build Type 'Debug' Build File | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: './Debug/action-28377s-cpu1.out' | |
asset_name: 'action-28377s-cpu1-Debug.out' | |
asset_content_type: 'application/octet-stream' | |
- name: Upload Release Asset Build Type 'Release' Build File | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: './Release/action-28377s-cpu1.out' | |
asset_name: 'action-28377s-cpu1-Release.out' | |
asset_content_type: 'application/octet-stream' | |