From 8b239bb629a6f7838cd9883eaa6163c1b5d037e6 Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:24:54 +0200 Subject: [PATCH] ci: Restore commented out code --- .github/workflows/publish-release.yml | 41 ++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index e28445d9..ddb124c9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -39,18 +39,18 @@ jobs: version: ${{ steps.extract-version.outputs.version }} bump: patch id: bump-version - #- name: Updating version properties - # run: | - # sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" gradle.properties - # git config user.name "GitHub Actions" - # git config user.email "<>" - # git commit -am "Set version to ${{ steps.bump-version.outputs.version }}" - # git push origin ${BRANCH_NAME} - # git tag -a "v${{ steps.bump-version.outputs.version }}" -m "Release ${{ steps.bump-version.outputs.version }}" - # git push origin "v${{ steps.bump-version.outputs.version }}" - # shell: bash - # env: - # BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + - name: Updating version properties + run: | + sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" gradle.properties + git config user.name "GitHub Actions" + git config user.email "<>" + git commit -am "Set version to ${{ steps.bump-version.outputs.version }}" + git push origin ${BRANCH_NAME} + git tag -a "v${{ steps.bump-version.outputs.version }}" -m "Release ${{ steps.bump-version.outputs.version }}" + git push origin "v${{ steps.bump-version.outputs.version }}" + shell: bash + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - name: Preparing build matrix id: set-build-matrix uses: actions/github-script@v7 @@ -91,6 +91,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ needs.create-release.outputs.ref }} - name: Validate gradle wrapper uses: gradle/actions/wrapper-validation@v3 - name: Setup JDK @@ -117,6 +119,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ needs.create-release.outputs.ref }} - name: Validate gradle wrapper uses: gradle/actions/wrapper-validation@v3 - name: Setup JDK @@ -150,8 +154,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - #with: - # ref: ${{ needs.create-release.outputs.ref }} + with: + ref: ${{ needs.create-release.outputs.ref }} - name: Download ${{ matrix.loader }} artifact uses: actions/download-artifact@v4 with: @@ -170,11 +174,10 @@ jobs: - name: Check current artifact hash TODO run: sha1sum ${{ matrix.loader }}/build/libs/* - name: Publish - #run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' - run: ./gradlew :${{ matrix.loader }}:build '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' - #env: - # CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE_TOKEN}} - # MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} + run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' + env: + CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE_TOKEN}} + MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} - name: Check new artifact hash TODO run: sha1sum ${{ matrix.loader }}/build/libs/* needs: