updated version #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy snapshot | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
deploy-snapshot: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v2 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_CENTRAL_TOKEN | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Configure Git User | |
run: | | |
git config user.email "actions@github.com" | |
git config user.name "GitHub Actions" | |
- name: Set up GPG | |
run: | | |
echo "$GPG_SIGNING_PRIVATE_KEY" > private.asc | |
gpg --import --batch private.asc | |
env: | |
GPG_SIGNING_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_PRIVATE_KEY }} | |
# TODO append commit hash and date to snapshot version, so we can identify them easier | |
# - name: Deploy snpashot | |
# run: | | |
# cd ../mongock | |
# mvn clean deploy | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# MAVEN_USERNAME: ${{ secrets.NEXUS_USER }} | |
# MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }} | |
# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
# GPG_SIGNING_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_PRIVATE_KEY }} |