-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (67 loc) · 2.2 KB
/
Copy pathpublish.yml
File metadata and controls
78 lines (67 loc) · 2.2 KB
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
name: Build and publish
on:
pull_request:
types: [closed]
branches:
- develop
- beta
- stable
- 'v*.*.*'
jobs:
build_and_release:
if: github.event.pull_request.merged
name: Build and create release
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Calculate version
id: versioning
run: |
bash ./scripts/set_versions_ga.sh
- name: Determine prerelease status
id: release_info
run: |
if [[ "${{ env.BRANCH }}" == "stable" ]]; then
echo "prerelease=false" >> $GITHUB_OUTPUT
else
echo "prerelease=true" >> $GITHUB_OUTPUT
fi
- name: Build binaries
id: build
run: |
mkdir -p ${{ github.workspace }}/dist
docker build . -t node-cli-builder
docker run --rm -v ${{ github.workspace }}/dist:/app/dist node-cli-builder \
bash scripts/build.sh ${{ env.VERSION }} ${{ env.BRANCH }} skale
docker run --rm -v ${{ github.workspace }}/dist:/app/dist node-cli-builder \
bash scripts/build.sh ${{ env.VERSION }} ${{ env.BRANCH }} fair
echo "dist_path=${{ github.workspace }}/dist" >> $GITHUB_OUTPUT
- name: Generate checksums
run: |
cd ${{ steps.build.outputs.dist_path }}
for file in skale-*; do
sha512sum "$file" > "$file.sha512"
done
echo "Checksums generated:"
ls -l *.sha512
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}
draft: false
prerelease: ${{ steps.release_info.outputs.prerelease }}
generate_release_notes: true
files: |
${{ steps.build.outputs.dist_path }}/skale-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}