forked from LedgerHQ/app-recovery-check
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (45 loc) · 1.64 KB
/
release-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
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