-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (59 loc) · 1.94 KB
/
update-libs.yml
File metadata and controls
68 lines (59 loc) · 1.94 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
name: Update libs from CodeOnTheGo
on:
workflow_dispatch:
inputs:
ref:
description: CodeOnTheGo branch or tag to build from
required: false
default: stage
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout plugin-examples
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-disabled: true
add-job-summary: 'never'
- name: Compute release tag
id: tag
env:
RUN_NUMBER: ${{ github.run_number }}
run: echo "name=build-$(date -u +%Y-%m-%d)-${RUN_NUMBER}" >> "$GITHUB_OUTPUT"
- name: Run update-libs script
env:
REF: ${{ inputs.ref }}
run: ./scripts/update-libs.sh --ref "$REF"
- name: Commit updated jars
id: commit
run: |
sha=$(git -C .cache/CodeOnTheGo rev-parse --short HEAD)
git config user.name "ADFA"
git config user.email "dev-team@appdevforall.org"
git add libs/
if git diff --cached --quiet; then
echo "No changes to libs/ — nothing to commit."
else
git commit -m "chore: update libs from CodeOnTheGo@${sha}"
git push
fi
echo "codeonthego_sha=${sha}" >> "$GITHUB_OUTPUT"
echo "head_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Publish release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.name }}
target_commitish: ${{ steps.commit.outputs.head_sha }}
body: Built against CodeOnTheGo@${{ steps.commit.outputs.codeonthego_sha }}.
fail_on_unmatched_files: true
files: '*/build/plugin/*.cgp'