Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 230721f

Browse files
authored
Create publish-plugin.yml
1 parent a48c4d8 commit 230721f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
deploy:
22+
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Java ${{ matrix.java }}
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 17
31+
- name: Cache Maven packages
32+
uses: actions/cache@v3
33+
with:
34+
path: ~/.m2
35+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36+
restore-keys: ${{ runner.os }}-m2
37+
- id: install-secret-key
38+
name: Install gpg secret key
39+
run: |
40+
# Install gpg secret key
41+
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
42+
# Verify gpg secret key
43+
gpg --list-secret-keys --keyid-format LONG
44+
- name: Build and deploy with Maven
45+
env:
46+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
47+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
48+
run: mvn -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean compile verify package gpg:sign deploy

0 commit comments

Comments
 (0)