Skip to content

Commit

Permalink
Merge branch 'asm-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
katherine-hough committed Oct 21, 2023
2 parents 9f783b3 + ac74707 commit bcd35aa
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ jobs:
java-version: ${{ matrix.java }}
- name: Run tests
run: mvn install -ntp -Ddacapo.skip=false
deploy:
runs-on: self-hosted
needs: build-and-test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Deploy
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_KEY_PASSPHRASE: ${{ secrets.DEPLOY_KEY_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: bash ./deployment/deploy.sh
15 changes: 5 additions & 10 deletions deployment/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/sh

TRAVIS_BUILD_DIR=`pwd`

base64 -d $DEPLOY_KEY > $TRAVIS_BUILD_DIR/deployment/signingkey.asc
gpg --batch --keyring=$TRAVIS_BUILD_DIR/pubring.gpg --no-default-keyring --import $TRAVIS_BUILD_DIR/deployment/signingkey.asc;
gpg --batch --allow-secret-key-import --keyring=$TRAVIS_BUILD_DIR/secring.gpg --no-default-keyring --import $TRAVIS_BUILD_DIR/deployment/signingkey.asc;
cd $TRAVIS_BUILD_DIR/Phosphor;
mvn -DskipTests deploy --settings $TRAVIS_BUILD_DIR/deployment/settings.xml -Dgpg.keyname=77787D71ED65A50488D41B82E876C482DFB8D3EB -Dgpg.passphrase=$DEPLOY_KEY_PASSPHRASE -Dgpg.publicKeyring=$TRAVIS_BUILD_DIR/pubring.gpg -Dgpg.secretKeyring=$TRAVIS_BUILD_DIR/secring.gpg
cd $TRAVIS_BUILD_DIR/phosphor-instrument-maven-plugin;
mvn -DskipTests deploy --settings $TRAVIS_BUILD_DIR/deployment/settings.xml -Dgpg.keyname=77787D71ED65A50488D41B82E876C482DFB8D3EB -Dgpg.passphrase=$DEPLOY_KEY_PASSPHRASE -Dgpg.publicKeyring=$TRAVIS_BUILD_DIR/pubring.gpg -Dgpg.secretKeyring=$TRAVIS_BUILD_DIR/secring.gpg
export GPG_TTY=$(tty)
echo $DEPLOY_KEY | base64 --decode > $GITHUB_WORKSPACE/deployment/signingkey.asc
gpg --batch --keyring=$GITHUB_WORKSPACE/deployment/pubring.gpg --no-default-keyring --import $GITHUB_WORKSPACE/deployment/signingkey.asc;
gpg --batch --allow-secret-key-import --keyring=$GITHUB_WORKSPACE/deployment/secring.gpg --no-default-keyring --import $GITHUB_WORKSPACE/deployment/signingkey.asc;
mvn -DskipTests deploy --settings $GITHUB_WORKSPACE/deployment/settings.xml -Dgpg.keyname=77787D71ED65A50488D41B82E876C482DFB8D3EB -Dgpg.passphrase=$DEPLOY_KEY_PASSPHRASE -Dgpg.publicKeyring=$GITHUB_WORKSPACE/deployment/pubring.gpg -Dgpg.secretKeyring=$GITHUB_WORKSPACE/deployment/secring.gpg
34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,38 @@
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>gpg.passphrase</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit bcd35aa

Please sign in to comment.