Our great sponsors
-
Chips-n-Salsa
A Java library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
On each push to the default branch (assumed main in this example), I'm using the following workflow (just fill in the details of your reverse domain, and default branch name, where relevant). This sample workflow makes the same assumptions as the previous section (e.g., that your reversed domain is com.example, etc). See jitpack-build.yml in one of my repositories for a live example.
name: Release on: release: types: [created] jobs: publish: runs-on: ubuntu-latest steps: - name: Get the release version, removing the v from the tag id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} - name: Request release from JitPack to trigger build run: | JITPACK_URL="https://jitpack.io/com/example/REPOSITORY/${{ steps.get_version.outputs.VERSION }}/" # timeout in 30 seconds to avoid waiting for build curl -s -m 30 ${JITPACK_URL} || true
Related posts
- Deploying Java Artifacts to Multiple Maven Repositories with GitHub Actions
- How to Use the Maven Shade Plugin if Your Project Uses Java Platform Module System
- How to Configure JitPack for Recent JDK Versions
- JaCoCo coverage badges, PR coverage checks, and PR coverage comments, from GitHub Actions
- How to Enable DEV Post Embeds for Pages From Your Website