-
Notifications
You must be signed in to change notification settings - Fork 22
80 lines (69 loc) · 2.27 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
name: Create release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Build x86-64 mainnet
run: |
mkdir artifacts
git fetch -a
mvn clean compile package -DskipTests
cp target/MyLocalTon.jar artifacts/MyLocalTon-x86-64.jar
- name: Build x86-64 testnet
run: |
mvn clean compile package -DskipTests -Dton_branch=testnet
cp target/MyLocalTon.jar artifacts/MyLocalTon-x86-64-testnet.jar
- name: Build arm64-aarch64 mainnet
run: |
git checkout arm64-aarch64
mvn clean compile package -DskipTests
cp target/MyLocalTon.jar artifacts/MyLocalTon-arm64.jar
- name: Build arm64-aarch64 testnet
run: |
mvn clean compile package -DskipTests -Dton_branch=testnet
cp target/MyLocalTon.jar artifacts/MyLocalTon-arm64-testnet.jar
ls artifacts
# - name: Upload artifacts
# uses: actions/upload-artifact@master
# with:
# name: MyLocalTon
# path: artifacts
- name: Read CHANGELOG.md and use it as a body of new release
id: read_release
shell: bash
run: |
r=$(cat CHANGELOG.md)
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
r="${r//$'\r'/'%0D'}"
echo "::set-output name=CHANGELOG_BODY::$r"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: MyLocalTon v${{ github.run_number }}
body: |
${{ steps.read_release.outputs.CHANGELOG_BODY }}
draft: false
prerelease: true
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/MyLocalTon*
tag: v${{ github.run_number }}
overwrite: true