Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gimlet2 authored Aug 24, 2020
1 parent 93cd420 commit 4ea60cb
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
name: Java CI

on:
push:
branches:
- main
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1.4.1
with:
java-version: 1.11
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update version
run: mvn versions:set -DnewVersion=${{ github.event.release.tag }}
- name: Commit
run: |
git config --global user.name 'gimlet2'
git config --global user.email 'andrey.chernishov@gmail.com'
git commit -am "Update version"
git push
- name: Setup GPG
run: echo "$GPG_KEY" | gpg --import --batch --yes
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
- name: Build with Maven
run: ./mvnw package site:jar source:jar --file pom.xml --no-transfer-progress
- name: Publish to Github
run: ./mvnw deploy -Pgithub -Dgpg.keyname=$GPG_KEY_ID -Dgpg.passphrase=$GPG_KEY_PASS --no-transfer-progress
run: ./mvnw -X deploy -Pgithub -Dgpg.keyname=$GPG_KEY_ID -Dgpg.passphrase=$GPG_KEY_PASS --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
Expand Down

0 comments on commit 4ea60cb

Please sign in to comment.