diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..eebb9c5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,63 @@ +name: Create Maven release +on: + create: + tags: + - .* +jobs: + deploy: + name: Deploy release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.3 + - uses: actions/setup-java@v2 + with: + java-version: 8 + 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: 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: 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 diff --git a/.rultor.yml b/.rultor.yml deleted file mode 100644 index 032afc5..0000000 --- a/.rultor.yml +++ /dev/null @@ -1,36 +0,0 @@ -docker: - image: g4s8/rultor-jdk11:alpine3.10 -assets: - settings.xml: "yegor256/artipie-keys#settings.xml" - pubring.gpg: "yegor256/artipie-keys#pubring.gpg" - secring.gpg: "yegor256/artipie-keys#secring.gpg" -env: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk -install: | - export LC_ALL=en_US.UTF-8 - export LANG=en_US.UTF-8 - export LANGUAGE=en_US.UTF-8 -merge: - script: | - echo We don't merge via Rultor - exit 1 -deploy: - script: | - echo There is nothing to deploy - exit 1 -release: - sensitive: - - settings.xml - script: |- - pdd -f /dev/null - gpg --import /home/r/pubring.gpg - gpg --allow-secret-key-import --no-tty --batch --import /home/r/secring.gpg - mvn versions:set "-DnewVersion=${tag}" --settings ../settings.xml - git commit -am "${tag}" - mvn clean deploy -Partipie,publish,sonatype,qulice,gpg-sign --errors --settings ../settings.xml -DskipTests -architect: - - g4s8 - - yegor256 - - olegmoz - - olenagerasimova -