-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (58 loc) · 1.63 KB
/
build.yml
File metadata and controls
62 lines (58 loc) · 1.63 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
name: Build
on:
pull_request:
push:
branches:
- trunk
tags:
- '**'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-24.04-arm, windows-11-arm ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v5
- run: ./gradlew build
- uses: actions/upload-artifact@v6
if: matrix.os == 'ubuntu-24.04-arm'
with:
name: string-res-exporter-binary
path: build/libs/string-res-exporter-*-binary.jar
if-no-files-found: error
# Status check that is required in branch protection rules.
build-status:
needs:
- build
runs-on: ubuntu-24.04-arm
if: always()
steps:
- name: Check
run: |
results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
echo "One or more required jobs failed"
exit 1
fi
echo "All required jobs completed successfully."
release:
runs-on: ubuntu-24.04-arm
if: github.repository_owner == 'Goooler' && startsWith(github.ref, 'refs/tags/')
needs: build-status
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
- name: Create release and upload binary.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" **/*binary.jar --generate-notes