This is a GitHub Action that can be used to create release candidates. Note that it is somewhat opinionated on how release candidates are organized. This is not intended to be used by all projects.
runs-on workflow setting should be Linux based (e.g. ubuntu-latest)actions/checkout prior to triggering this actionVERSION file containing the current version of the project (e.g. 1.0.0)v<VERSION>-* (e.g. v1.0.0-rc1)https://downloads.apache.org/<tlp_dir>/KEYS.Below are the operations this action does to setup the environment for a release candidate workflow:
dist/dev/ SVN directory and create a directory for release artifacts in https://dist.apache.org/repos/dist/dev/<tlp_dir>/<project_dir>/<version>-rcX. The artifact_dir output is set to this directory. Note that <project_dir> is optional if the artifact directory should be in the root of the <tlp_dir>dist/dev/ for the same version Useful if an rc fails the VOTE and another is createdsrc/apache-<project_id>-<version>-src.zip in the above artifact directorySOURCE_DATE_EPOCH environment variable to match the timestamp of the current commitsbt pubilshSigned without needing any other configuration. If publishing is disabled, SBT is configured to publish to a local maven repo on the CI system, so sbt publishSigned can still be used without actually publishing anything.If the workflow job does not succeed, none of the following actions are taken. Files added to dist/dev/ will not be committed. If the workflow published files to the ASF staging nexus repository, those files must be manually dropped.
If the workflow job successfully completes, the following actions are performed at the end of the workflow:
dist/dev/ to SVNNote that committing to SVN is is disabled if any of the following are true:
publish input is not explicitly set to trueVERSION file contains -SNAPSHOTapache organizationIf any of the above are true and publishing is disabled, the artifact directory is uploaded as a GitHub workflow artifact. It will be retained for one day. This is useful for testing the workflow using workflow dispatch.
| Input | Required | Default | Description |
|---|---|---|---|
| tlp_dir | yes | Directory of the top level project in dist/dev/ | |
| project_name | yes | Human readable name of the project | |
| project_id | yes | ID of the project, used in source artifact file name | |
| project_dir | no | "" | Directory for the project in dev/dist/<tlp_dir>/. Omit if at the root |
| gpg_signing_key | if publishing | Key used to sign artifacts | |
| svn_username | if publishing | Username for publishing release artifacts to SVN dev/dist | |
| svn_password | if publishing | Password for publishing release artifacts to SVN dev/dist | |
| nexus_username | if publishing | Username for publishing release artifacts to Nexus | |
| nexus_password | if publishing | Password for publishing release artifacts to Nexus | |
| publish | no | false | Enable/disabling publish artifacts. Must be explicitly set to true to enable publishing. May be ignored depending on other factors. |
| Output | Description |
|---|---|
| artifact_dir | Directory where additional release artifacts can be added by the workflow. They are automatically signed, checksumed, and published at the end of the workflow |
name: Release Candidate # triggered via release candidate tags or manually via workflow dispatch, note # that publishing is disabled if not triggered from a tag on: push: tags: - 'v*-rc*' workflow_dispatch: jobs: release-candidate: name: RC ${{ github.ref_name }} runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - name: ASF Release Candidate id: rc uses: apache/daffodil-infrastructure/release-candidate@main with: tlp_dir: 'daffodil' project_name: 'Apache Daffodil' project_id: 'daffodil' gpg_signing_key: ${{ secrets.GPG_PRIVATE_KEY }} svn_username: ${{ secrets.SVN_USERNAME }} svn_password: ${{ secrets.SVN_PASSWORD }} nexus_username: ${{ secrets.NEXUS_USERNAME }} nexus_password: ${{ secrets.NEXUS_PASSWORD }} publish: true - name: Install Dependencies run: | sudo apt-get -y install ... ... - name: Create Binary Artifacts run: | sbt compile publishSigned ... ARTIFACT_DIR=${{ steps.rc.outputs.artifact_dir }} ARTIFACT_BIN_DIR=$ARTIFACT_DIR/bin # copy helper binaries to the artifact bin directory, these will be # automatically signed, checksumed, and comitted to dist/dev/ mkdir -p $ARTIFACT_BIN_DIR cp ... $ARTIFACT_BIN_DIR/
GitHub actions require that any changes made to the files in the src/ directory are compiled into index.js files in dist/ subdirectories. To do this, run the commands:
npm install
npm run build
The changes this makes to dist/ must be committed along with the changes to src/.
Perform the following steps to test changes to the daffodil-infrastructure repo on a GitHub fork:
uses action of the ASF Release Candidate step in the .github/workflows/release-candidate.yml file of the repository to be tested on. Then, push your changes to your fork of the test repository.Run workflow button, and select the branch you just pushed to.Artifacts tab under Summary. After downloading the release, extract it.If you want to validate things with the check-release container, follow its steps as defined in its README.md. The only modification you need to make is to set the release label to rc0. Then run the checks using the container using the following command:
podman run -it --rm \ --volume <DOWNLOADED-RELEASE-DIR>:/release-download \ --volume <ARTIFACT-DIR>:/release \ daffodil-check-release "NA" "NA" /release
Note: The public key needed to verify the artifacts is available in the release-download directory.