Merge pull request #11 from artipie/ech-dev #16
Workflow file for this run
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: Create Maven release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v3 | |
with: | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Set env | |
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set version | |
run: | | |
cd mvn-resolver-transport-http3 | |
mvn -B versions:set -DnewVersion=${{ env.TAG }} versions:commit | |
- name: Create settings.xml | |
uses: whelk-io/maven-settings-xml-action@v15 | |
with: | |
servers: | | |
[ | |
{ | |
"id": "oss.sonatype.org", | |
"username": "${{ secrets.SONATYPE_USER }}", | |
"password": "${{ secrets.SONATYPE_PASSWORD }}" | |
} | |
] | |
profiles: | | |
[ | |
{ | |
"id": "artipie", | |
"properties": { | |
"gpg.keyname": "${{ secrets.GPG_KEYNAME }}", | |
"gpg.passphrase": "${{ secrets.GPG_PASSPHRASE }}" | |
} | |
} | |
] | |
- name: Deploy artifacts | |
run: | | |
cd mvn-resolver-transport-http3 | |
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" | |
mvn deploy -Partipie,publish,sonatype,gpg-sign -DskipITs --errors | |
- name: Create Github Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ env.TAG }} | |
draft: false | |
prerelease: false |