Unverified Commit ed8f8519 authored by Manish Kumar's avatar Manish Kumar Committed by GitHub
Browse files

Fix/sdk release issue (#705)

* [publish] [skip tests] import gpg key

* [publish] [skip tests] import gpg key

* [publish] release 4.11.0-A2

* [publish] release 4.11.0-A2

* [publish] release 4.11.0-A2
parent 6ab259ae
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ env:
  MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
  MAVEN_CENTRAL_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
  MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
  GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
  GITHUB_ACTIONS_DEPLOY_TIMEOUT: 90

jobs:
@@ -170,6 +171,15 @@ jobs:
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
      - name: "Build"
        run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
      - name: Import GPG key
        env:
          GPG_TTY: $(tty)
        run: |
          echo "${{ secrets.GPG_SIGNING_PRIVATE_KEY }}" | gpg --batch --import
          echo "use-agent" >> ~/.gnupg/gpg.conf
          echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
          echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
          gpg --batch --yes --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE --list-keys
      - name: "Publish"
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
        run: mvn deploy $MAVEN_CLI_OPTS -DskipTests
 No newline at end of file
        run: mvn --batch-mode clean deploy -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE
 No newline at end of file
+46 −6
Original line number Diff line number Diff line
@@ -330,12 +330,40 @@

        <profile>
            <id>sdk-release</id>
            <properties>
                <maven.site.url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest</maven.site.url>
                <maven.release.goals>deploy site-deploy</maven.release.goals>
            </properties>
            <distributionManagement>
                <repository>
                    <id>central-releases-staging</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.8.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
@@ -352,10 +380,22 @@
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>central-releases-staging</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
@@ -548,8 +588,8 @@

    <distributionManagement>
        <repository>
            <id>central-releases-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
            <id>alfresco-public</id>
            <url>https://nexus.alfresco.com/nexus/repository/releases</url>
        </repository>
        <snapshotRepository>
            <id>alfresco-public-snapshots</id>