Skip to content

Latest commit

 

History

History
66 lines (40 loc) · 3.4 KB

DEVELOPER.md

File metadata and controls

66 lines (40 loc) · 3.4 KB

Developers

This document provides guidance for using this repository to release USGS executables.

Overview

This repository only builds USGS programs and contains none of their source code. Its contents are concerned only with the build and release process. Repository contents have no direct relationship to release cadence or version/tag numbers.

This repo is configured to allow manually triggering releases, independent of changes to version-controlled files.

The .github/workflows/release.yml workflow is triggered on the following events:

  • push to master
  • pull_request to any branch
  • workflow_dispatch

If the triggering event is push or pull_request, metadata is updated, binaries are built and uploaded as artifacts, and the workflow ends.

If the triggering event is a workflow_dispatch:

  • Metadata is updated. If changes are detected to any of the program versions or timestamps, a draft PR is opened against the master branch to update the table in README.md.
  • Binaries are built and uploaded as artifacts
  • A release is created, incrementing the version number.

Note: the release is currently published immediately, but could be changed to a draft by updating the draft input on ncipollo/release-action in .github/workflows/release.yml.

Note: version numbers don't currently follow semantic versioning conventions, but simply increment an integer for each release.

Triggering a release

The workflow_dispatch event is GitHub's mechanism for manually triggering workflows. This can be accomplished from the Actions tab in the GitHub UI, or via the GitHub CLI.

GitHub UI

Navigate to the Actions tab of this repository. Select the release workflow. A Run workflow button should be visible in an alert at the top of the list of workflow runs. Click the Run workflow button, selecting the master branch.

GitHub CLI

Install and configure the GitHub CLI if needed. Then the following command can be run from the root of your local clone of the repository:

gh workflow run release.yml

On the first run, the CLI will prompt to choose whether the run should be triggered on your fork of the repository or on the upstream version. This decision is stored for subsequent runs — to override it later, use the --repo (short -R) option to specify the repository. For instance, if you initially selected your fork but would like to trigger a release on the main repository:

gh workflow run release.yml -R MODFLOW-USGS/executables

Note: by default, workflow runs are associated with the repository's default branch. If the repo's default branch is develop (as is currently the case for MODFLOW-USGS/executables, you will need to use the --ref (short -r) option to specify the master branch when triggering a release from the CLI. For instance:

gh workflow run release.yml -R MODFLOW-USGS/executables -r master