-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.73 KB
/
make-release-reusable.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
name: Reusable make release CI
on:
workflow_call:
jobs:
main:
name: Main job
runs-on: ubuntu-latest
steps:
# Checkout source files used by the Python checker
- name: Checkout sources
uses: actions/checkout@v4
# Release tag name == cmake eversion ?
- name: Check cmake and release versions
shell: bash
run: |
echo Project path: $GITHUB_WORKSPACE
echo Release number: ${{ github.ref_name }}
git clone --depth=1 https://github.com/LIHPC-Computational-Geometry/spack_recipes.git
cd $GITHUB_WORKSPACE/spack_recipes/.github/workflows && python check-version.py $GITHUB_WORKSPACE ${{ github.ref_name }}
# Create a Github Release
- name: Create a release
uses: softprops/action-gh-release@v2
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Download release source (.tar.gz) + compute SHA256 + write file with SHA256
- name: Compute SHA256
shell: bash
run: |
echo Project name: ${{ github.event.repository.name }}
echo Release number: ${{ github.ref_name }}
echo Project path: $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE/spack_recipes/.github/workflows && python compute-sha256.py ${{ github.event.repository.name }} ${{ github.ref_name }} $GITHUB_WORKSPACE
# Update release with sha
- name: Update release with SHA256
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}/newbody.md
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}