Skip to content

Create Release

Create Release #87

---
name: Create Release
on:
workflow_run:
workflows: ['Compilation & tests']
types:
- completed
jobs:
create_release:
name: Create Release
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'v') && github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Clone
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Set VERSION variable from tag
run: |
HEAD_BRANCH=${{ github.event.workflow_run.head_branch }}
echo "VERSION_NUMBER=${HEAD_BRANCH#v}" >> ${GITHUB_ENV}
echo "VERSION_NAME=${HEAD_BRANCH//./_}" >> ${GITHUB_ENV}
- name: Download app binaries
uses: dawidd6/action-download-artifact@v3
with:
name: compiled_app_binaries
path: ./bin/
commit: ${{ github.event.workflow_run.head_sha }}
workflow: ci-workflow.yml
workflow_conclusion: success
skip_unpack: true
- name: Rename app binaries
run: ls -la ./bin/ && sudo mv ./bin/compiled_app_binaries.zip ./bin/compiled_app_binaries.${VERSION_NAME}.zip && ls -la ./bin/
- name: Create Release
uses: ncipollo/release-action@v1
with:
name: Seed Tool application for Ledger - Release ${{ env.VERSION_NUMBER }}
artifacts: ./bin/*.zip
artifactContentType: application/zip
bodyFile: CHANGELOG.md
tag: ${{ github.event.workflow_run.head_branch }}
makeLatest: true
allowUpdates: true