Upload maven packages using SNAPSHOT version and classifier

Hi, I’ve been trying to upload a maven artefact to GitHub Packages within a workflow, but encountered a HTTP response 400: Bad request. After some research, I found that it was due to the upload of a SNAPSHOT version, and the use of a classifier (with sources and javadoc). I found a similar issue here: Error on Github Packages for `-SNAPSHOT` maven artifacts with a classifier, which isn’t solved. However I found another related issue (Partial support for maven SNAPSHOTs) where jscandale points out that it should be fixed, and where the original poster confirmed it worked, though I still have the problem on my side.
I continued my research but didn’t find any more information that could help me fix the issue.

Here’s my action file

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Publish maven package to GitHub Packages

on:
  push:
    branches: [master, sql]
  release:
    types: [created]

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 16
        uses: actions/setup-java@v2
        with:
          java-version: '16'
          distribution: 'adopt'
          server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
          settings-path: ${{ github.workspace }} # location for the settings.xml file

      - name: Build with Maven
        run: mvn -B package --file pom.xml

      - name: Publish to GitHub Packages Apache Maven
        run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
        env:
          GITHUB_TOKEN: ${{ github.token }}

      - uses: actions/upload-artifact@v2
        with:
          name: tesseractLib
          path: |
            /home/runner/work/TesseractLib/TesseractLib/target/*.jar
            !/home/runner/work/TesseractLib/TesseractLib/target/*sources.jar
            !/home/runner/work/TesseractLib/TesseractLib/target/original*.jar

And my pom.xml file

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>onl.tesseract</groupId>
    <artifactId>tesseractlib</artifactId>
    <version>2.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <java.version>16</java.version>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
         
    <distributionManagement>
         <repository>
             <id>github</id>
             <name>GitHub Packages</name>
             <url>https://maven.pkg.github.com/TesseractFR/TesseractLib</url>
         </repository>
     </distributionManagement>
         
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>16</source>
                    <target>16</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>papermc</id>
            <url>https://papermc.io/repo/repository/maven-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.17-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <type>maven-plugin</type>
        </dependency>
    </dependencies>
</project>

Any help would be appreciated

After deleting and recreating the package, it works. I can now upload several snapshot versions !