Skip to content

About

A GitHub Action to download a nightly build of the WildFly Maven repository and extract the repository to the local .m2/repository directory.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

wildfly-nightly-download

The wildfly-nightly-download action provides a way to download the latest nightly SNAPSHOT build of WildFly’s Maven repository from WildFly’s CI server. It downloads the last successful Maven repository and installs it in the ~/.m2/repository. The download repository simply contains the ~/.m2/repository/org/wildfly/*/*SNAPSHOT files and directories.

Usage

It includes a single output parameter which is the version of the downloaded artifacts.

  • wildfly-version: The version of the WildFly artifacts that were downloaded.

Example

steps:
  - uses: actions/checkout@v4
  - uses: wildfly-extras/wildfly-nightly-download@v1
    id: wildfly-nightly
  - name: Set up JDK ${{ matrix.java }}
    uses: actions/setup-java@v4
    with:
      java-version: ${{ matrix.java }}
      cache: 'maven'
      distribution: 'temurin'
  - name: Build and Test on ${{ matrix.os }} - ${{ matrix.java }} with WildFly ${{steps.wildfly-nightly.outputs.wildfly-version}}
    run: mvn clean verify '-Dversion.org.wildfly=${{steps.wildfly-nightly.outputs.wildfly-version}}'

Building

To build this project you simply need to run:

npm run build

The compiled dist/index.js is committed to the repository, since GitHub Actions runs it directly with no install or build step of its own. CI verifies dist/ is up to date on every PR by rebuilding and diffing it, so any change to src/ must be accompanied by a rebuilt, committed dist/index.js. You can run the same check locally with:

npm run verify:dist

Testing

Unit tests use Node’s built-in test runner and require no additional dependencies. Run them with:

npm test

Unit tests do not exercise the real download, since that requires network access to WildFly’s CI server and would make the suite flaky. To manually smoke test against the real server:

INPUT_URI="https://ci.wildfly.org/guestAuth/repository/download/WF_Nightly/latest.lastSuccessful/wildfly-maven-repository.tar.gz" \
INPUT_PATH=$(mktemp -d) \
node src/index.js

INPUT_PATH sandboxes the extracted repository into a throwaway directory instead of ~/.m2/repository.

Releasing

Releasing is done via the "Release" GitHub Actions workflow (.github/workflows/release.yml), triggered manually from the Actions tab or with gh workflow run release.yml -f version=2.0.0.

Given a version input, the workflow:

  • Tags the current main commit vX.Y.Z and force-moves the floating major tag (e.g. v2) to it, since consumers pin to the major tag.

  • Creates a GitHub release from that tag.

  • Opens a PR bumping package.json/package-lock.json to the next development version (an auto patch bump, or the next-version input if provided). Merge that PR to start the next development cycle.

The workflow assumes dist/ on main is already up to date, which CI enforces on every PR.

About

A GitHub Action to download a nightly build of the WildFly Maven repository and extract the repository to the local .m2/repository directory.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages