Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
release: actions scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
g4s8 committed Nov 16, 2021
1 parent 96f585d commit fc5b8db
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 36 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Create Maven release
on:
create:
tags:
- .*
jobs:
deploy:
name: Deploy release
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- 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
36 changes: 0 additions & 36 deletions .rultor.yml

This file was deleted.

0 comments on commit fc5b8db

Please sign in to comment.