Skip to content

Release Process

Sebastian Ehlert edited this page Nov 13, 2022 · 16 revisions

Creating Fpm releases

This guide describes how to create a new fpm release.

Release workflow

The release artifact generation in fpm is automated, however to ensure the automation will work, we devised this workflow for creating a test release. Important, always use a branch in your fork for the release preparation steps.

  1. Make sure to enable GitHub actions on your fork (visit the actions tab, required only once)
  2. Bump the version in fpm.toml and in the CLI output in src/fpm_command_line.f90
  3. Create a new test release in your fork, the release tag is always prefixed, i.e. version 0.4.0 is tagged as v0.4.0.
  4. Wait for the workflow to publish the release artifacts to your test release tag
  5. Open a PR against the main repository:
    • include a link to your test release tag
    • add the release notes, usual sections are Changed, New Features, Fixed and link with the respective PRs
    • wait for feedback and test the binaries from the test release tag
  6. Merge the PR and create the actual release tag in the main repository

The release at GitHub will automatically be announced to everybody watching the repository for releases.

Release aftermath

After creating the release there is still work to be done.

Announcing the release

Additionally to GitHub's release notification the release should be announced at the Fortran-lang discourse and via the @fortranlang Twitter account.

Fpm documentation

Add a new post with the release notes to the fpm documentation, by creating a new post in the news directory. The front matter of the post is formatted as

---
author: ...
date: YYYY-MM-DD
category: release
...

# Fpm version <version> released

The post is translatable like everything in the fpm documentation, make sure to ping the translators.

Conda-forge package

We package fpm on conda-forge. To update the conda package fork the fpm-feedstock. Updating the recipe (recipe/meta.yaml) can be done in the GitHub web interface or by cloning the repository, make sure to create a branch in your fork for this purpose.

The following steps should be sufficient for updating

  1. Download the source tarball from the release tag
  2. Get its SHA256 checksum
  3. Update the version number and the checksum in the recipe and reset the build number to 0 if necessary.
  4. Rerender the feedstock (only if you are working locally)
  5. Create a new PR against the main feedstock
  6. Request the bot to rerender (only if you haven't rerendered locally)
  7. Wait for the maintainers to approve and merge

You can also wait for the regro-autotick-bot to perform this steps, but this introduces some latency (only hours not days).

To rerender locally use

mamba create -n build conda-build conda-smithy conda-forge-pinning -c conda-forge
mamba activate build
mamba smithy rerender

If you don't have mamba, you can also use conda for the command, but it is better to simply install mamba first.

MSYS2 package

We package fpm for Windows with the MSYS2 toolchain. To update the MSYS2 package fork the MINGW-packages repository. Updating the package file (mingw-w64-fpm/PKGBUILD) can be done in the GitHub web interface or by cloning the repository, make sure to create a branch in your fork for this purpose.

The following steps should be sufficient for updating

  1. Download the source tarball from the release tag
  2. Get its SHA256 checksum
  3. Update the version number and the checksum in the package file and reset the pkgrel number to 1 if necessary
  4. Create a new PR against the main repository
  5. Wait for the maintainers to approve and merge

The MSYS2 maintainer will sign the package and upload it to the package mirror, this can take several hours.

Spack package

We package fpm with spack. To update the spack package fork the spack repository. The package file can be found in var/spack/repos/builtin/packages/fpm/package.py.

  1. Download the source tarball from the release tag
  2. Get its SHA256 checksum
  3. Add the new version the package file
  4. Create a new PR against the main repositories develop branch
  5. Wait for the maintainers to approve and merge

Homebrew tap

A custom homebrew tap for fpm is maintained. To update the homebrew package fork the tap repository. The package file can be found in Formula/fpm.rb and updated in the GitHub web interface or by cloning the repository, make sure to create a branch in your fork for this purpose.

The following steps should be sufficient for updating

  1. Download the source tarball from the release tag
  2. Get its SHA256 checksum
  3. Update the version number and the checksum in the formula and remove the revision entry if necessary
  4. Follow the brew commit conventions and use fpm <version> as commit message
  5. Create a new PR against the main repository
  6. Wait for the maintainers to approve and add the pr-pull label

The new binary package will be automatically published on via a GitHub release tag.

Winget package

We also package fpm for Windows with winget.

Setup repository

Firstly, clone the winget-pkgs repository, and create a fork for it.

git clone https://github.com/microsoft/winget-pkgs --depth 1
cd winget-pkgs

# gh is GitHub's command line tool.
# this command sets remote `origin` to your fork,
# and add an `upstream` remote.
gh repo fork --remote

Create a branch in fork

Create a new branch for the fork.

git fetch upstream
git checkout -b fpm-<version> upstream/master

Author manifests

If you are using Windows or have PowerShell installed, you can use YamlCreate.ps1 to automate the update process. Just run following command to create new manifests, replace <version> with the new version number.

.\Tools\YamlCreate.ps1 -PackageIdentifier FortranLang.fpm -PackageVersion <version> -Mode 2 -AutoUpgrade

The script will ask you for the new download url. It should be something like https://github.com/fortran-lang/fpm/releases/download/v<version>/fpm-<version>-windows-x86_64.exe, which you can find from our release page. Then, the script will download installer, calculate hash and create files under ./manifests/f/FortranLang/fpm/<version>/ automatically.

After these files are generated, you need to manually edit LicenseUrl in FortranLang.fpm.locale.en-US.yaml. You can optinally add ReleaseNotesUrl into FortranLang.fpm.locale.en-US.yaml, and add ReleaseDate into FortranLang.fpm.installer.yaml.

If you doesn't have PowerShell, you can also manually copy these files from an old version, and manually edit the download url and its hash.

Note Currently Windows Package Manager Manifest Creator (wingetcreate.exe) cannot parse portable package, so we can't use that.

Test manifests

Manifest test will be automaticlly done by YamlCreate.ps1, or you can manually do it.

# validate the package
winget validate manifests/f/FortranLang/fpm/<version>
# install the package locally
winget install -m manifests/f/FortranLang/fpm/<version>

Submit Pull Request

After you validated and tested the new package, it's time to submit a pull request.

git add manifests/f/FortranLang/fpm/0.7.0/
git commit -m 'New version: FortranLang.fpm version <version>'

# gh is GitHub's command line tool.
# this command creates a pull request (PR) to upstream
# and use commit title/body as PR info 
gh pr create --fill
Clone this wiki locally