@@ -48,14 +48,56 @@ jobs:
4848 if [ -n "$version" ]; then
4949 sed -i "s/version=.*-SNAPSHOT$/version=$version/1" gradle.properties
5050 fi
51- ./gradlew clean build -x test
51+ ./gradlew clean buildAll
5252 - name : Archive extra-api jar
5353 uses : actions/upload-artifact@v4
5454 with :
55- name : extra-api
55+ name : extra-api-archive
5656 path : |
5757 build/libs/*.jar
5858 retention-days : 1
59+ - name : Upload extra-api-full-all-platforms
60+ uses : actions/upload-artifact@v4
61+ with :
62+ name : extra-api-full-all-platforms
63+ path : build/libs/extra-api-full-all-platforms-*.jar
64+ retention-days : 1
65+ - name : Upload extra-api-full-linux-arm64
66+ uses : actions/upload-artifact@v4
67+ with :
68+ name : extra-api-full-linux-arm64
69+ path : build/libs/extra-api-full-linux-arm64-*.jar
70+ retention-days : 1
71+ - name : Upload extra-api-full-linux-x86_64
72+ uses : actions/upload-artifact@v4
73+ with :
74+ name : extra-api-full-linux-x86_64
75+ path : build/libs/extra-api-full-linux-x86_64-*.jar
76+ retention-days : 1
77+ - name : Upload extra-api-full-macos-arm64
78+ uses : actions/upload-artifact@v4
79+ with :
80+ name : extra-api-full-macos-arm64
81+ path : build/libs/extra-api-full-macos-arm64-*.jar
82+ retention-days : 1
83+ - name : Upload extra-api-full-macos-x86_64
84+ uses : actions/upload-artifact@v4
85+ with :
86+ name : extra-api-full-macos-x86_64
87+ path : build/libs/extra-api-full-macos-x86_64-*.jar
88+ retention-days : 1
89+ - name : Upload extra-api-full-windows-x86_64
90+ uses : actions/upload-artifact@v4
91+ with :
92+ name : extra-api-full-windows-x86_64
93+ path : build/libs/extra-api-full-windows-x86_64-*.jar
94+ retention-days : 1
95+ - name : Upload extra-api-lite
96+ uses : actions/upload-artifact@v4
97+ with :
98+ name : extra-api-lite
99+ path : build/libs/extra-api-lite-*.jar
100+ retention-days : 1
59101
60102 github-release :
61103 runs-on : ubuntu-latest
@@ -67,17 +109,14 @@ jobs:
67109 with :
68110 name : extra-api
69111 path : build/libs
70- - name : Get Name of Artifact
71- id : get_artifact
112+ - name : Get Name of Artifacts
113+ id : get_artifacts
72114 run : |
73- ARTIFACT_PATHNAME=$(ls build/libs/*.jar | head -n 1)
74- ARTIFACT_NAME=$(basename ${ARTIFACT_PATHNAME})
75- echo "Artifact pathname: ${ARTIFACT_PATHNAME}"
76- echo "Artifact name: ${ARTIFACT_NAME}"
77- echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
78- echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
115+ ARTIFACT_PATHNAMES=$(ls build/libs/*.jar)
116+ echo "Artifact pathnames: ${ARTIFACT_PATHNAMES}"
117+ echo "ARTIFACT_PATHNAMES=${ARTIFACT_PATHNAMES}" >> $GITHUB_ENV
79118 echo "RELEASE_ID=${{ github.event.release.id }}" >> $GITHUB_ENV
80- - name : Upload a Release Asset
119+ - name : Upload Release Assets
81120 uses : actions/github-script@v2
82121 if : github.event_name == 'release'
83122 with :
@@ -90,14 +129,17 @@ jobs:
90129 const { repo: { owner, repo }, sha } = context;
91130 console.log({ owner, repo, sha });
92131
93- const releaseId = process.env.RELEASE_ID
94- const artifactPathName = process.env.ARTIFACT_PATHNAME
95- const artifactName = process.env.ARTIFACT_NAME
96- console.log('Releasing', releaseId, artifactPathName, artifactName)
132+ const releaseId = process.env.RELEASE_ID;
133+ const artifactPathNames = process.env.ARTIFACT_PATHNAMES.split(' ');
134+ console.log('Releasing', releaseId, artifactPathNames);
97135
98- await github.repos.uploadReleaseAsset({
99- owner, repo,
100- release_id: releaseId,
101- name: artifactName,
102- data: await fs.readFile(artifactPathName)
103- });
136+ for (const artifactPathName of artifactPathNames) {
137+ const artifactName = artifactPathName.split('/').pop();
138+ console.log('Uploading', artifactPathName, artifactName);
139+ await github.repos.uploadReleaseAsset({
140+ owner, repo,
141+ release_id: releaseId,
142+ name: artifactName,
143+ data: await fs.readFile(artifactPathName)
144+ });
145+ }
0 commit comments