-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.event.workflow_run.conclusion == 'success' && | ||
github.event.workflow_run.head_branch == 'main' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: src | ||
|
||
- name: Set dictionary version | ||
# TODO: remove 'test-' prefix! | ||
run: echo "PT_DICT_VERSION=test-$(git describe --tags --abbrev=0 | sed 's/^v//g')" >> $GITHUB_ENV | ||
|
||
- name: Set up JDK 11 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
|
||
# This step makes sure that we're using the settings.xml file with env vars prepared for GPG and SonaType | ||
- name: Copy settings.xml to m2 | ||
run: cp results/java-lt/settings.xml $HOME/.m2/settings.xml | ||
|
||
# Add your deployment steps here | ||
- name: Deploy | ||
env: | ||
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
run: | | ||
mvn clean deploy -P release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<localRepository /> | ||
<interactiveMode /> | ||
<offline /> | ||
<pluginGroups /> | ||
<profiles> | ||
<profile> | ||
<id>gpg</id> | ||
<properties> | ||
<gpg.executable>gpg</gpg.executable> | ||
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
<servers> | ||
<server> | ||
<id>os.languagetool.org</id> | ||
<username>anonymous</username> | ||
<password>none</password> | ||
</server> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
<mirrors /> | ||
<proxies /> | ||
<activeProfiles> | ||
<activeProfile>gpg</activeProfile> | ||
</activeProfiles> | ||
</settings> |