diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17ddd9f76..7ccd22ede 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,8 +199,12 @@ jobs: run: mvn -T 1.5C -B -U clean verify - name: Publish - run: mvn -T 1.5C -B deploy --settings .github/settings.xml -DaltDeploymentRepository=set-github::https://maven.pkg.github.com/${{ github.repository }} - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/') + run: | + repoPath=set-github::https://maven.pkg.github.com/${{ github.repository }} + if [ ${{ github.ref }} != 'refs/heads/main' && !startsWith(${{ github.ref }}, 'refs/heads/release/') && !startsWith${{ github.ref }}, 'refs/tags/')]; then + repoPath="local::file://${{ github.workspace}}/set-m2deploy" + fi + mvn -T 1.5C -B deploy --settings .github/settings.xml -DaltDeploymentRepository=${repoPath} env: GITHUB_TOKEN: ${{ github.token }} @@ -211,6 +215,13 @@ jobs: path: java/bundles/org.eclipse.set.releng.set.product/target/products/SET/win32/win32/x86_64/ retention-days: 7 + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: set-m2deploy-${{github.run_number}} + path: ${{ github.workspace}}/set-m2deploy + retention-days: 7 + - name: Prepare release asset if: startsWith(github.ref, 'refs/tags/') run: |