Skip to content

Commit

Permalink
Fixes for release
Browse files Browse the repository at this point in the history
  • Loading branch information
soer8647 committed Feb 1, 2024
1 parent 26ab803 commit c6386e6
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 32 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ env:
jobs:
build-native-ubuntu:
runs-on: ubuntu-22.04

steps:
# Setup rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69

# Checkout the code
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Make ubuntu native dependencies
run: make

Expand All @@ -39,23 +39,23 @@ jobs:

build-native-macos:
runs-on: macos-latest

steps:
# Setup rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69

# Checkout the code
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Make macos native dependencies
run: make

- name: Upload macos library
uses: actions/upload-artifact@master
with:
Expand All @@ -64,23 +64,23 @@ jobs:

build-native-windows:
runs-on: windows-latest

steps:
# Setup rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69

# Checkout the code
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Make windows native dependencies
run: cd crypto-jni && cargo build --release

- name: Upload windows library
uses: actions/upload-artifact@master
with:
Expand Down Expand Up @@ -118,21 +118,21 @@ jobs:
# Use fixed OS version because we install packages on the system.
runs-on: ubuntu-22.04
environment: release

if: ${{ !github.event.pull_request.draft }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
submodules: recursive
- name: Set Up Android tools
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
--sdk_root=$ANDROID_SDK_ROOT \
"platform-tools" "platforms;android-27" "build-tools;27.0.3"
- name: Setup JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'adopt'
Expand All @@ -142,7 +142,7 @@ jobs:
with:
name: ubuntu-library
path: concordium-sdk/native

- name: Download macos library
uses: actions/download-artifact@master
with:
Expand All @@ -163,7 +163,7 @@ jobs:

# Builds and tests the sdk. Delomboks code and generates a javadoc jar from the delombok'ed code
- name: Build and test sdk
run: cd concordium-sdk && mvn --batch-mode --update-snapshots install && mvn lombok:delombok -f pom.xml && mvn javadoc:jar -f pom.xml && mvn source:jar
run: cd concordium-sdk && mvn --batch-mode --update-snapshots install -Pwith-dependencies && mvn lombok:delombok -f pom.xml && mvn javadoc:jar -f pom.xml && mvn source:jar

- name: Deploy javadoc
uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
Expand Down Expand Up @@ -193,8 +193,9 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PWD }}
GPG_PASSPHRASE: ${{secrets.SONATYPE_PHRASE }}
- name: Copy javadocs and sources for android
run: >
mv concordium-sdk/target/*-javadoc.jar concordium-android-sdk/target/concordium-android-sdk-javadoc.jar
run: >
mkdir -p concordium-android-sdk/target
&& mv concordium-sdk/target/*-javadoc.jar concordium-android-sdk/target/concordium-android-sdk-javadoc.jar
&& mv concordium-sdk/target/*-sources.jar concordium-android-sdk/target/concordium-android-sdk-sources.jar
- name: Publish android package to central maven repository
run: cd concordium-android-sdk && mvn --batch-mode deploy -Pdeploy
Expand All @@ -209,5 +210,5 @@ jobs:
files: |
concordium-sdk/target/*.jar
concordium-android-sdk/target/concordium-android-sdk.aar
48 changes: 36 additions & 12 deletions concordium-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.concordium.sdk</groupId>
<groupId>com.concordium.sdk</groupId>
<artifactId>concordium-sdk-base</artifactId>
<version>6.0.2</version>
</parent>
Expand Down Expand Up @@ -141,18 +141,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>

</build>
</profile>
<profile>
Expand Down Expand Up @@ -187,6 +176,13 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-dependencies</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -242,6 +238,34 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadoc-and-source</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/concordium-sdk-${project.version}-javadoc.jar</file>
<type>jar</type>
<classifier>javadoc</classifier>
</artifact>
<artifact>
<file>target/concordium-sdk-${project.version}-sources.jar</file>
<type>jar</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit c6386e6

Please sign in to comment.