Skip to content

Commit bee28a4

Browse files
committed
fix names in release workflow (#418)
1 parent 78eaee5 commit bee28a4

File tree

3 files changed

+14
-59
lines changed

3 files changed

+14
-59
lines changed

.github/actions/setup-maven-cache/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using: "composite"
55
steps:
66
- name: Cache Maven packages
7-
uses: actions/cache@v3
7+
uses: actions/cache@v4
88
with:
99
path: ~/.m2
1010
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

.github/workflows/release.yaml

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ on:
44
workflow_dispatch: { }
55

66
jobs:
7-
build_and_deploy:
8-
name: Build and Deploy to Maven Central
7+
build:
8+
name: Release
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
1212
- uses: ./.github/actions/setup-jdk
1313
- uses: ./.github/actions/setup-maven-cache
14-
- uses: ./.github/actions/run-tests
1514

1615
- name: Prepare for release
1716
run: ./mvnw versions:set -DremoveSnapshot=true -DgenerateBackupPoms=false
@@ -20,25 +19,9 @@ jobs:
2019
id: get_version
2120
run: echo "VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
2221

23-
- name: Deploy
22+
- name: Build
2423
run: ./mvnw -P release --batch-mode -DskipTests package
2524

26-
- name: Upload JARs as artifact
27-
uses: actions/upload-artifact@v2
28-
with:
29-
name: jars
30-
path: ./target/*.jar
31-
32-
commit_and_tag:
33-
name: Commit and Tag
34-
needs: build_and_deploy
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: ./.github/actions/setup-jdk
38-
39-
- name: Set version
40-
run: ./mvnw versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false
41-
4225
- name: Update README.md
4326
run: sed -i "s|<version>.*</version>|<version>${{ env.VERSION }}</version>|g" README.md
4427

@@ -61,17 +44,7 @@ jobs:
6144
with:
6245
github_token: ${{ secrets.GITHUB_TOKEN }}
6346
branch: ${{ github.ref }}
64-
65-
create_github_release_and_attach_artifacts:
66-
name: Create GitHub Release and attach artifacts
67-
needs: commit_and_tag
68-
runs-on: ubuntu-latest
69-
steps:
70-
- name: Download build artifacts
71-
uses: actions/download-artifact@v2
72-
with:
73-
name: build-artifacts
74-
path: ./target
47+
tags: true
7548

7649
- name: Build Changelog
7750
id: build_changelog
@@ -87,20 +60,15 @@ jobs:
8760
env:
8861
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8962
with:
90-
tag_name: ${{ steps.get_version.output.version }}
91-
release_name: Release ${{ steps.get_version.output.version }}
92-
draft: false
93-
prerelease: false
63+
tag_name: ${{ env.VERSION }}
64+
release_name: Release ${{ env.VERSION }}
65+
draft: true
66+
prerelease: true
9467
body: ${{steps.build_changelog.outputs.changelog}}
9568

9669
- name: Upload all jars to Release
97-
run: |
98-
for file in ./target/*.jar; do
99-
echo "Uploading $file"
100-
curl \
101-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
102-
-H "Content-Type: $(file -b --mime-type $file)" \
103-
--data-binary @"$file" \
104-
"${{ steps.create_release.outputs.upload_url }}?name=$(basename $file)"
105-
done
106-
shell: bash
70+
uses: AButler/upload-release-assets@v3.0
71+
with:
72+
files: "target/*.jar"
73+
repo-token: ${{ secrets.GITHUB_TOKEN }}
74+
release-id: ${{ steps.create_release.outputs.id }}

pom.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -480,19 +480,6 @@
480480
</execution>
481481
</executions>
482482
</plugin>
483-
<plugin>
484-
<groupId>org.apache.maven.plugins</groupId>
485-
<artifactId>maven-javadoc-plugin</artifactId>
486-
<version>3.6.3</version>
487-
<executions>
488-
<execution>
489-
<id>attach-javadocs</id>
490-
<goals>
491-
<goal>jar</goal>
492-
</goals>
493-
</execution>
494-
</executions>
495-
</plugin>
496483
<plugin>
497484
<groupId>org.apache.maven.plugins</groupId>
498485
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)