Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: actions

run-name: RePyability CI

# The one automated test run: the full suite on a pull request into master
# The one automated test run: the full suite on a pull request into main
# (from dev). Nothing else runs it; release.yml publishes only what it
# passed.
on:
pull_request:
branches: [master]
branches: [main]

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/close-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: close issues

# Close the issues a pull request into dev finishes, when it merges.
# GitHub itself closes an issue only when the pull request that says
# "Closes #N" merges into the default branch (master), which here happens
# "Closes #N" merges into the default branch (main), which here happens
# at a release: this closes them as the work reaches dev, with a comment
# naming the pull request. It runs no tests (the one automated test run
# is actions.yml, on the pull request from dev into master).
# is actions.yml, on the pull request from dev into main).

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: docs

# Build the MkDocs site and publish it to GitHub Pages on every push to
# master. Pull requests are validated by the strict docs build in
# main. Pull requests are validated by the strict docs build in
# actions.yml; this workflow does the actual deployment.
#
# One-time repository setup (Settings -> Pages -> Build and deployment):
# set the Source to "GitHub Actions". No gh-pages branch is used.

on:
push:
branches: [master]
branches: [main]
workflow_dispatch:

# Grant the GITHUB_TOKEN the permissions the Pages deployment needs.
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: release

# Publishes the package to PyPI, in either of two ways.
#
# 1. Run this workflow by hand on master (Actions -> release -> Run workflow;
# `gh workflow run release.yml --ref master -f version=X.Y`; or the REST
# 1. Run this workflow by hand on main (Actions -> release -> Run workflow;
# `gh workflow run release.yml --ref main -f version=X.Y`; or the REST
# API). It checks that the version typed in matches
# repyability/_version.py, that CHANGELOG.md has a dated section for it,
# that the tag vX.Y does not exist yet, that the full suite passed on
# these files (on the pull request from dev into master) and
# these files (on the pull request from dev into main) and
# that PyPI does not have the version. It then builds, publishes to PyPI,
# and last creates the tag vX.Y and a GitHub Release. The release notes
# open with the CHANGELOG section's summary, followed by GitHub's
Expand Down Expand Up @@ -71,8 +71,8 @@ jobs:
echo "::error::'$REQUESTED' isn't major.minor: versions have two parts (e.g. 0.11)."
exit 1
fi
if [ "$GITHUB_REF" != "refs/heads/master" ]; then
echo "::error::Releases are cut from master, not $GITHUB_REF."
if [ "$GITHUB_REF" != "refs/heads/main" ]; then
echo "::error::Releases are cut from main, not $GITHUB_REF."
exit 1
fi
version=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' repyability/_version.py)
Expand All @@ -88,9 +88,9 @@ jobs:
echo "::error::The tag v$version already exists."
exit 1
fi
# The full suite runs on the pull request from dev into master
# The full suite runs on the pull request from dev into main
# (actions.yml), whose run is recorded against dev's commit. The
# merge commit on master holds the same files, so a pass on this
# merge commit on main holds the same files, so a pass on this
# commit, or on a parent with the same files, counts.
repo="repos/$GITHUB_REPOSITORY"
tree=$(gh api "$repo/git/commits/$GITHUB_SHA" --jq '.tree.sha')
Expand All @@ -104,7 +104,7 @@ jobs:
fi
done
if [ -z "$passed" ]; then
echo "::error::The full suite (actions.yml) has not passed on these files: on $GITHUB_SHA or the dev commit it merged. Open the pull request from dev into master and wait for it."
echo "::error::The full suite (actions.yml) has not passed on these files: on $GITHUB_SHA or the dev commit it merged. Open the pull request from dev into main and wait for it."
exit 1
fi
echo "The full suite passed on $passed, with the same files as $GITHUB_SHA."
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ RePyability needs Python 3.11 or later and surpyval 0.24 or later.
## Branches and the one automated test run

Work branches off **`dev`** and goes back into `dev` by pull request.
Releases go from `dev` into `master`.
Releases go from `dev` into `main`.

There is **one automated test run**: the full suite on the pull request from
`dev` into `master` (`.github/workflows/actions.yml`). Nothing runs on pushes
`dev` into `main` (`.github/workflows/actions.yml`). Nothing runs on pushes
or on pull requests into `dev`, so check your change locally before it goes
in:

Expand Down Expand Up @@ -118,10 +118,10 @@ release:
`[Unreleased]` section into a dated `## [X.Y] - YYYY-MM-DD` section. Its
opening paragraphs become the summary at the top of the release notes.
Update the version in `docs/guide/saving.md`. Merge to `dev`, then open
the pull request from `dev` into `master`, which runs the full suite.
2. Once it has passed, merge it and run the `release` workflow on master
the pull request from `dev` into `main`, which runs the full suite.
2. Once it has passed, merge it and run the `release` workflow on main
with the version: Actions → release → Run workflow, or
`gh workflow run release.yml --ref master -f version=X.Y`. Add
`gh workflow run release.yml --ref main -f version=X.Y`. Add
`-f dry_run=true` to check and build without publishing. The workflow
checks the version, the CHANGELOG section, that the tag is new, that CI
passed and that PyPI does not have the version. Then it builds, publishes
Expand Down
Loading