Skip to content

Commit

Permalink
chore(ci): CI working again
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Mar 15, 2024
1 parent 06d1176 commit 43ab348
Showing 1 changed file with 20 additions and 34 deletions.
54 changes: 20 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,20 @@ jobs:
cache: 'gradle'

- name: Build Artifact
run: ./gradlew build
run: ./gradlew release

# - name: Set up Artifact Upload
# run: |
# echo "CORE_ARTIFACT_PATH=$(./gradlew :distributor-core:getArtifactPath -q)" >> $GITHUB_ENV
# echo "KOTLIN_ARTIFACT_PATH=$(./gradlew :distributor-kotlin:getArtifactPath -q)" >> $GITHUB_ENV

# - name: Upload Artifact to Actions (Core)
# uses: actions/upload-artifact@v3
# with:
# name: ${{ github.event.repository.name }}
# path: ${{ env.CORE_ARTIFACT_PATH }}
- name: Upload Test Summary
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "test results"
junit_files: "**/build/test-results/test/TEST-*.xml"

# - name: Upload Artifact to Actions (Kotlin)
# uses: actions/upload-artifact@v3
# with:
# name: ${{ github.event.repository.name }}
# path: ${{ env.KOTLIN_ARTIFACT_PATH }}
- name: Upload Artifacts to Actions
uses: actions/upload-artifact@v3
with:
name: distributor-artifacts
path: build/tmp/release/*.jar

- name: Determine Status
run: |
Expand All @@ -62,31 +58,21 @@ jobs:
fi
- name: Publish to Xpdustry
if: "${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master') }}"
if: "${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master || startsWith(github.ref, 'refs/heads/dev') }}"
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}"

# - name: Upload Artifact to Release (Core)
# if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
# uses: svenstaro/upload-release-action@v2
# with:
# asset_name: distributor-core.jar
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ${{ env.CORE_ARTIFACT_PATH }}
# tag: ${{ github.ref }}

# - name: Upload Artifact to Release (Kotlin)
# if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
# uses: svenstaro/upload-release-action@v2
# with:
# asset_name: distributor-kotlin.jar
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ${{ env.KOTLIN_ARTIFACT_PATH }}
# tag: ${{ github.ref }}
- name: Upload Artifacts to Release
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: build/tmp/release/*.jar
tag: ${{ github.ref }}

- name: Update Changelog
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
Expand Down

0 comments on commit 43ab348

Please sign in to comment.