-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (61 loc) · 1.93 KB
/
build.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
name: JavaBuild
on:
push:
paths:
- '**.java'
- 'resources/*'
- '*manifest*'
- '**build.yml'
- '**build_*.sh'
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build_packages:
name: "Platformio package build"
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
- name: "Build jar"
run: |
php $GITHUB_WORKSPACE/.github/scripts/check_l10n.php src/main/resources/l10n
[ $? -eq 0 ] || die "Missing translations"
jar_file="build/ESP32PartitionTool.jar"
. $GITHUB_WORKSPACE/.github/scripts/build_jar.sh $jar_file
[ $? -eq 0 ] || die "Jar creation failed"
$GITHUB_WORKSPACE/.github/scripts/create_arduino_package.sh $jar_file
[ $? -eq 0 ] || die "Arduino Package creation failed"
$GITHUB_WORKSPACE/.github/scripts/create_platformio_package.sh $jar_file
[ $? -eq 0 ] || die "Platformio Package creation failed"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: PackageFiles
path: |
ESP32PartitionTool-Arduino.zip
esp32partitiontool-platformio.zip
post_build:
name: Gather Artefacts
runs-on: ubuntu-latest
# wait until jobs are all finished
needs: build_packages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: archives
- name: Release check
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/home/runner/work/esp32partitiontool/esp32partitiontool/archives/**
token: ${{ secrets.RELEASE_TOKEN }} # Use the secret here