Skip to content

Commit

Permalink
.github: Refactored release pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaenrig-ifx committed Aug 16, 2023
1 parent e4ab769 commit 0fbb5c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_package_sha256(pkg):
return hashlib.sha256(pkg.encode('UTF-8')).hexdigest()

def get_latest_package_index_json():
return requests.get('https://github.com/Infineon/XMC-for-Arduino/releases/latest/download/package_infineon_index.json').json()
return requests.get('https://github.com/Infineon/XMC-for-Arduino/releases/latest/download/package_infineon_index.json').json()

def get_platform_data_struct_copy(pkg_index):
return copy.deepcopy(pkg_index['packages'][0]['platforms'][0])
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,35 @@ name: XMC-for-Arduino Release Automation
on:
release:
types: published

push:
tags:
- 'v*.*.*'
- 'V*.*.*'
jobs:
build:
name: Publish Release
release:
runs-on: ubuntu-latest

if: startsWith(github.ref, 'refs/tags/V')
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Build Release
- name: Build release changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./.github/scripts/on-release.sh
- name: Build release assets
run: |
cd .github/scripts
echo "Tag name : ${{ github.ref_name }}"
python release.py build-release ${{ github.ref_name }}
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
name: XMC for Arduino ${{ github.ref_name }}
files: |
pkg_build/*.zip
pkg_build/package_infineon_index.json
body: ${{steps.build_changelog.outputs.changelog}}

0 comments on commit 0fbb5c7

Please sign in to comment.