From 6c9dcd3c5a505800d0299311d7bda5165413215b Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Fri, 8 Sep 2023 20:19:10 +1000 Subject: [PATCH] fix: release JAR files --- .github/workflows/release.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29d5c2aa32..91b532db5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' -name: Build Docker Images +name: Release jobs: build-runner: name: Build Runner Docker Image @@ -42,9 +42,12 @@ jobs: name: docker-controller-artifact path: artifacts/ftl-controller retention-days: 1 - push-images: - name: Push Docker Images + release-assets: + name: Release Assets runs-on: ubuntu-latest + permissions: + contents: read + packages: write needs: [build-runner, build-controller] steps: - name: Checkout code @@ -71,7 +74,7 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Push + - name: Push Docker Images run: | version=$(git describe --tags --abbrev=0) docker tag ghcr.io/tbd54566975/ftl-runner:latest ghcr.io/tbd54566975/ftl-runner:$GITHUB_SHA @@ -80,21 +83,15 @@ jobs: docker tag ghcr.io/tbd54566975/ftl-controller:latest ghcr.io/tbd54566975/ftl-controller:$GITHUB_SHA docker tag ghcr.io/tbd54566975/ftl-controller:latest ghcr.io/tbd54566975/ftl-controller:$version docker push -a ghcr.io/tbd54566975/ftl-controller - publish: - name: Publish to Maven - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Init Hermit - uses: cashapp/activate-hermit@v1 - - name: Set version - run: mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false - - name: Publish packages - run: mvn --batch-mode deploy + # Ideally we'd use Hermit's JDK, but this action creates the correct settings.xml for us. + - uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Publish JARs + run: | + mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false + mvn --batch-mode deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}