Skip to content

Commit

Permalink
fix: release JAR files
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Sep 8, 2023
1 parent 11cab6b commit 6c9dcd3
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit 6c9dcd3

Please sign in to comment.