diff --git a/.github/workflows/cd-config.yml b/.github/workflows/cd-config.yml index 1b30a9cc1..50cf752b8 100644 --- a/.github/workflows/cd-config.yml +++ b/.github/workflows/cd-config.yml @@ -116,3 +116,36 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin ./buildtools/src/main/resources/docker/publishToGitHub.sh + cloudsmith: + name: Deploy artefacts to Cloudsmith + needs: [build] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.1.0 + - name: Set up JDK 11 + uses: actions/setup-java@v1.3.0 + with: + java-version: 11 + + - name: Build Trellis + run: ./gradlew assemble + + - name: Install cloudsmith CLI + run: | + python -m pip install --upgrade pip + pip install --upgrade cloudsmith-cli + + - name: Publish distributions to Cloudsmith + if: contains(github.ref, 'trellis') + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_TOKEN }} + run: | + export VERSION=$(./gradlew -q getVersion) + /home/runner/.local/bin/cloudsmith push raw trellisldp/release \ + --version="${VERSION}" \ + --name="Trellis" \ + --summary="Trellis Release" \ + --description="A release of the Trellis Linked Data Server" \ + platform/dropwizard/build/distributions/trellis-${VERSION}.zip +