-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (73 loc) · 2.61 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
permissions:
actions: read
id-token: write
contents: write
jobs:
linea-mainnet:
uses: ./.github/workflows/linea-mainnet.yml
secrets: inherit
linea-sepolia:
uses: ./.github/workflows/linea-sepolia.yml
secrets: inherit
release:
needs:
- linea-mainnet
- linea-sepolia
runs-on: ubuntu-latest
environment: dockerhub
steps:
- name: checkout
uses: actions/checkout@v4
- name: collate the artifacts into a folder
run: |
mkdir dist
echo "Artifacts workflow_run_id: ${{ needs.ethereum.outputs.workflow_run_id }}"
- name: download linea-mainnet
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: Consensys/linea-besu-package
name: linea-mainnet
path: dist/linea-mainnet
run-id: ${{ needs.linea-mainnet.outputs.workflow_run_id }}
- name: download linea-sepolia
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: Consensys/linea-besu-package
name: linea-sepolia
path: dist/linea-sepolia
run-id: ${{ needs.linea-sepolia.outputs.workflow_run_id }}
- name: set release tag
id: releasetag
run: |
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then
echo "TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "TAG=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
fi
- name: concatenate the three release files
run: |
tree dist
tar -czvf linea-besu-package-mainnet${{ steps.releasetag.outputs.TAG }}.tar.gz ./dist/linea-mainnet
tar -czvf linea-besu-package-sepolia${{ steps.releasetag.outputs.TAG }}.tar.gz ./dist/linea-sepolia
cat dist/linea-mainnet/output.md >> output.md
cat dist/linea-sepolia/output.md >> output.md
- name: release on tag - publish artifacts and release notes
if: startsWith(github.ref, 'refs/tags/v')
id: release_publish
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
body_path: output.md
generate_release_notes: true
fail_on_unmatched_files: true
files: |
linea-besu-package-mainnet${{ steps.releasetag.outputs.TAG }}.tar.gz
linea-besu-package-sepolia${{ steps.releasetag.outputs.TAG }}.tar.gz