title: GitHub Actions: Publication of Snapshot fails
body: <p>As I have understood, it is now possible to publish Snapshot versions to GitHub Packages. Trying to do so using Gradle and GitHub Actions, I'm stumbling upon an error I can't really explain or fix:</p>
  <pre><code>&gt; Task :publishMavenJavaPublicationToGitHubPackagesRepository
  Caching disabled for task ':publishMavenJavaPublicationToGitHubPackagesRepository' because:
    Build cache is disabled
  Task ':publishMavenJavaPublicationToGitHubPackagesRepository' is not up-to-date because:
    Task has not declared any outputs despite executing actions.
  Publishing to repository 'GitHubPackages' (https://maven.pkg.github.com/myOrga/myProject)
  Uploading maven-metadata.xml to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/maven-metadata.xml
  Uploading myProject-1.3.0-develop-20220107.090323-3.jar to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/myProject-1.3.0-develop-20220107.090323-3.jar
  Uploading myProject-1.3.0-develop-20220107.090323-3.pom to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/myProject-1.3.0-develop-20220107.090323-3.pom
  Uploading myProject-1.3.0-develop-20220107.090323-3-sources.jar to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/myProject-1.3.0-develop-20220107.090323-3-sources.jar
  Uploading myProject-1.3.0-develop-20220107.090323-3-javadoc.jar to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/myProject-1.3.0-develop-20220107.090323-3-javadoc.jar
  Uploading myProject-1.3.0-develop-20220107.090323-3.module to /myOrga/myProject/com/github/myOrga/myProject/1.3.0-develop-SNAPSHOT/myProject-1.3.0-develop-20220107.090323-3.module
  Uploading maven-metadata.xml to /myOrga/myProject/com/github/myOrga/myProject/maven-metadata.xml
  
  :publishMavenJavaPublicationToGitHubPackagesRepository (Thread[Execution worker for ':',5,main]) completed. Took 25.433 secs.
  FAILURE: Build failed with an exception.
  :publish (Thread[Execution worker for ':',5,main]) started.
  
  
  * What went wrong:
  &gt; Task :publish
  Execution failed for task ':release'.
  Skipping task ':publish' as it has no actions.
  &gt; Problem pushing to remote.
  :publish (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
  
  * Try:
  Run with --debug option to get more log output. Run with --scan to get full insights.
  
  * Exception is:
  org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':release'.
  
  [...]
  
  Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/myOrga/myProject: Authentication is required but no CredentialsProvider has been registered
      at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:489)
      at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:381)
      at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160)
      at org.eclipse.jgit.transport.Transport.push(Transport.java:1272)
      at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:161)
      ... 138 more
  </code></pre>
  <p>(<code>myOrga</code> and <code>myProject</code> are just placeholders for the real values.)</p>
  <p>So, as I understand: Uploading of all the JARs and POMs etc. works, but in the end, it tries to upload the <code>maven-metadata.xml</code> to the &quot;root&quot; <code>/myOrga/myProject/com/github/myOrga/myProject/maven-metadata.xml</code>, which fails.</p>
  <p>The relevant parts of my setup look like this:</p>
  <p><strong>build.gradle:</strong></p>
  <pre><code>publishing {
      publications {
          mavenJava(MavenPublication) {
              from(components.java)
              artifact sourcesJar
              artifact javadocJar
          }
      }
      repositories {
          maven {
              name = &quot;GitHubPackages&quot;
              url = &quot;https://maven.pkg.github.com/myOrga/myProject&quot;
              credentials {
                  username = project.ghActor
                  password = project.ghToken
              }
          }
      }
  }
  </code></pre>
  <p>The credentials are set correctly, I have checked this multiple times.</p>
  <p><strong>GitHub Action YML</strong>:</p>
  <pre class="lang-yaml prettyprint-override"><code>jobs:
    build:
      runs-on: ubuntu-latest
      steps:
      [...]
      - name: Release Snapshot
        run: ./gradlew -si release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  </code></pre>
  <p>Please note: I'm using the semantic release plugin <code>id 'de.gliderpilot.semantic-release' version '1.4.2'</code> here, that's why I'm calling the <code>release</code> task. <s>Anyway, this should not make any difference, as this <code>release</code> task depends on the (standard) <code>publish</code> task, which is the one that fails. So the &quot;real&quot; <code>release</code> task has not been executed yet and the error occurs during <code>publish</code>.</s></p>
  <p>The purpose of all of that is, that I want to achieve the following:</p>
  <ol>
  <li>Trigger a Snapshot build on every push to the <code>develop</code> branch</li>
  <li>Deploy the artifacts generated to GitHub Packages</li>
  <li>(Possibly) add a GitHub tag and release of that snapshot version</li>
  </ol>
  <p>(Step 3. isn't mandatory for the <code>develop</code> branch, but it will be later on for the <code>main</code> branch.)</p>
  <p>Can you please help me fix this error or give me a hint to achieve the three steps a better way? Many thanks in advance!</p>
  <p><strong>UPDATE:</strong></p>
  <p>Shame on me - as it seems, the semantic-release-plugin <em>does</em> cause the problem (see the lines I crossed out meanwhile). I still don't know, how this can happen, but now I have something more to look into.</p>