Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TruongQuangSB authored May 31, 2024
1 parent 6dae677 commit d368cc8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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: |
Expand Down

0 comments on commit d368cc8

Please sign in to comment.