@@ -12,7 +12,7 @@ permissions:
1212 contents : write
1313
1414jobs :
15- update-libs :
15+ release :
1616 runs-on : ubuntu-latest
1717 timeout-minutes : 45
1818 steps :
@@ -31,62 +31,38 @@ jobs:
3131 cache-disabled : true
3232 add-job-summary : ' never'
3333
34+ - name : Compute release tag
35+ id : tag
36+ env :
37+ RUN_NUMBER : ${{ github.run_number }}
38+ run : echo "name=build-$(date -u +%Y-%m-%d)-${RUN_NUMBER}" >> "$GITHUB_OUTPUT"
39+
3440 - name : Run update-libs script
3541 env :
36- REF : ${{ github.event. inputs.ref }}
42+ REF : ${{ inputs.ref }}
3743 run : ./scripts/update-libs.sh --ref "$REF"
3844
39- - name : Upload Beepy CGP
40- uses : actions/upload-artifact@v4
41- with :
42- name : beepy
43- path : Beepy/build/plugin/*.cgp
44- if-no-files-found : error
45-
46- - name : Upload apk-viewer CGP
47- uses : actions/upload-artifact@v4
48- with :
49- name : apk-viewer
50- path : apk-viewer/build/plugin/*.cgp
51- if-no-files-found : error
52-
53- - name : Upload markdown-preview CGP
54- uses : actions/upload-artifact@v4
55- with :
56- name : markdown-preview
57- path : markdown-preview/build/plugin/*.cgp
58- if-no-files-found : error
59-
60- - name : Upload keystore-generator CGP
61- uses : actions/upload-artifact@v4
62- with :
63- name : keystore-generator
64- path : keystore-generator/build/plugin/*.cgp
65- if-no-files-found : error
66-
67- - name : Upload snippets CGP
68- uses : actions/upload-artifact@v4
69- with :
70- name : snippets
71- path : snippets/build/plugin/*.cgp
72- if-no-files-found : error
73-
74- - name : Upload ndk-installer CGP
75- uses : actions/upload-artifact@v4
76- with :
77- name : ndk-installer
78- path : ndk-installer-plugin/build/plugin/*.cgp
79- if-no-files-found : error
80-
8145 - name : Commit updated jars
46+ id : commit
8247 run : |
8348 sha=$(git -C .cache/CodeOnTheGo rev-parse --short HEAD)
8449 git config user.name "ADFA"
8550 git config user.email "dev-team@appdevforall.org"
8651 git add libs/
8752 if git diff --cached --quiet; then
8853 echo "No changes to libs/ — nothing to commit."
89- exit 0
54+ else
55+ git commit -m "chore: update libs from CodeOnTheGo@${sha}"
56+ git push
9057 fi
91- git commit -m "chore: update libs from CodeOnTheGo@${sha}"
92- git push
58+ echo "codeonthego_sha=${sha}" >> "$GITHUB_OUTPUT"
59+ echo "head_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
60+
61+ - name : Publish release
62+ uses : softprops/action-gh-release@v2
63+ with :
64+ tag_name : ${{ steps.tag.outputs.name }}
65+ target_commitish : ${{ steps.commit.outputs.head_sha }}
66+ body : Built against CodeOnTheGo@${{ steps.commit.outputs.codeonthego_sha }}.
67+ fail_on_unmatched_files : true
68+ files : ' */build/plugin/*.cgp'
0 commit comments