|
22 | 22 | workflow_dispatch:
|
23 | 23 | inputs:
|
24 | 24 | version:
|
25 |
| - description: "Release version" |
| 25 | + description: 'Release version' |
| 26 | + required: true |
| 27 | + branch: |
| 28 | + description: 'Branch' |
| 29 | + default: 'master' |
26 | 30 | required: true
|
27 |
| - |
28 |
| -env: |
29 |
| - JAVA_VERSION: '11' |
30 |
| - JAVA_DISTRO: 'zulu' |
31 | 31 |
|
32 | 32 | jobs:
|
33 | 33 | release:
|
34 | 34 | name: Release
|
35 |
| - runs-on: ubuntu-latest |
36 |
| - steps: |
37 |
| - - uses: actions/checkout@v4 |
38 |
| - with: |
39 |
| - fetch-depth: 0 |
40 |
| - |
41 |
| - - name: Cancel previous run |
42 |
| - |
43 |
| - with: |
44 |
| - access_token: ${{ secrets.GITHUB_TOKEN }} |
45 |
| - |
46 |
| - - name: Set up Java |
47 |
| - uses: actions/setup-java@v4 |
48 |
| - with: |
49 |
| - java-version: ${{ env.JAVA_VERSION }} |
50 |
| - distribution: ${{ env.JAVA_DISTRO }} |
51 |
| - cache: gradle |
52 |
| - |
53 |
| - - name: Version |
54 |
| - id: vars |
55 |
| - shell: bash |
56 |
| - run: | |
57 |
| - echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT |
58 |
| - echo ${{ github.event.inputs.version }} > VERSION |
59 |
| - git add VERSION |
60 |
| - sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ github.event.inputs.version }}/g" README.adoc |
61 |
| - git config --global user.email "${{ secrets.COMMIT_EMAIL }}" |
62 |
| - git config --global user.name "Andres Almiray" |
63 |
| - git commit -a -m "Releasing version ${{ github.event.inputs.version }}" |
64 |
| - git push origin master |
65 |
| -
|
66 |
| - - name: Deploy |
67 |
| - run: | |
68 |
| - ./gradlew -Pprofile=sbom -PreproducibleBuild=true publish -S |
69 |
| -
|
70 |
| - - name: Release |
71 |
| - uses: jreleaser/release-action@v2 |
72 |
| - with: |
73 |
| - arguments: full-release |
74 |
| - env: |
75 |
| - JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }} |
76 |
| - JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
77 |
| - JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
78 |
| - JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} |
79 |
| - JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} |
80 |
| - JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
81 |
| - JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
82 |
| - JRELEASER_MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} |
83 |
| - |
84 |
| - - name: JReleaser output |
85 |
| - if: always() |
86 |
| - uses: actions/upload-artifact@v4 |
87 |
| - with: |
88 |
| - name: artifact |
89 |
| - path: | |
90 |
| - out/jreleaser/trace.log |
91 |
| - out/jreleaser/output.properties |
| 35 | + uses: kordamp/kordamp-workflows/.github/workflows/gradle-release.yml@main |
| 36 | + with: |
| 37 | + branch: ${{ github.event.inputs.branch }} |
| 38 | + version: ${{ github.event.inputs.version }} |
| 39 | + java-version: 11 |
| 40 | + secrets: |
| 41 | + github-token: ${{ secrets.GIT_ACCESS_TOKEN }} |
| 42 | + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} |
| 43 | + gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }} |
| 44 | + gpg-secret-key: ${{ secrets.GPG_SECRET_KEY }} |
| 45 | + gpg-key-id: ${{ secrets.GPG_KEY_ID }} |
| 46 | + maven-username: ${{ secrets.SONATYPE_USERNAME }} |
| 47 | + maven-password: ${{ secrets.SONATYPE_PASSWORD }} |
| 48 | + mastodon-access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} |
0 commit comments