How to build and ship a release
These are the instructions for producing a release.
GitHub Actions (GHA) will do most of the work for you. You will need to edit the draft release notes and click a button to make the release public.
Please change the version number as appropriate. Substitute (for example) v4.2.0
any place you see $VERSION
in this doc.
Step 0. Update dependencies
Step 1. Rebuild generated files
There should be no modified files. If there are, check them in then start over from the beginning:
Step 2. Tag the commit in main that you want to release
Soon after GitHub will start an Action Workflow called "draft release" which will build all release binaries and write the draft release notes.
Step 3. Create the release notes
The draft release notes are created for you. In this step you'll edit them.
The GHA workflow uses GoReleaser which produces the GitHub Release with Release Notes derived from the commit history between now and the last tag. These notes are just a draft and needs considerable editing. These release notes are used elsewhere, in particular the email step.
Release notes style guide:
Entries in the bullet list should be phrased in the positive: "Feature FOO now does BAR". This is often the opposite of the related issue, which was probably phrased, "Feature FOO is broken because of BAR".
Every item should include the ID of the issue related to the change. If there was no issue, create one and close it.
Sort the list most important/exciting changes earlier in the list.
Items related to a specific provider should begin with the all-caps name of the provider, such as "ROUTE53: Added support for sandwiches (#100)"
The
Deprecation warnings
section should just copy fromREADME.md
. If you change one, change it in the README too (you can make that change in this PR).
See https://github.com/StackExchange/dnscontrol/releases for examples for recent release notes and copy that style.
Step 4. Announce it via email
Email the release notes to the mailing list: (note the format of the Subject line and that the first line of the email is the URL of the release)
NOTE: You won't be able to post to the mailing list unless you are on it. Click here to join.
Step 5. Get credit
Mention the fact that you did this release in your weekly accomplishments.
If you are at Stack Overflow:
Add the release to your weekly snippets
Tip: How to bump the major version
If you bump the major version, you need to change all the source files. The last time this was done (v3 -> v4) these two commands were used. They're included her for reference.
Tip: Configuring GHA integration tests
Overview
GHA is configured to run an integration test for any provider listed in the "provider" list. However the test is skipped if the *_DOMAIN
variable is not set. For example, the Google Cloud provider integration test is only run if GCLOUD_DOMAIN
is set.
Q: Where is the list of providers to run integration tests on?
A: In
.github/workflows/pr_test.yml
: (1) the "PROVIDERS" list, (2) theintegrtests-diff2
section.Q: Where are non-secret environment variables stored?
A: GHA calls them "Variables". Update them here: https://github.com/StackExchange/dnscontrol/settings/variables/actions
Q: Where are SECRET environment variables stored?
A: GHA calls them "Secrets". Update them here: https://github.com/StackExchange/dnscontrol/settings/secrets/actions
How do I add a single new integration test?
Edit
.github/workflows/pr_test.yml
Add the
FOO_DOMAIN
variable name of the provider to the "PROVIDERS" list.Set the
FOO_DOMAIN
variables in GHA via https://github.com/StackExchange/dnscontrol/settings/variables/actionsAll other variables should be stored as secrets (for consistency). Add them to the
integration-tests
section. Set them in GHA via https://github.com/StackExchange/dnscontrol/settings/secrets/actions
How do I add a "bring your own keys" integration test?
Overview: You will fork the repo and add any secrets to your fork. For security reasons you won't have access to the secrets from the main repository.
Fork StackExchange/dnscontrol in GitHub.
If you already have a fork, be sure to use the "sync fork" button on the main page to sync with the upstream.
In your fork, set the
${DOMAIN}_DOMAIN
variable in GHA via Settings :: Secrets and variables :: Actions :: Variables.In your fork, set any secrets in GHA via Settings :: Secrets and variables :: Actions :: Secrets.
Start a build
Tip: How to rebuild flattener
Rebuilding flatter requires go1.17.1 and the gopherjs compiler.
Install go1.17.1:
Install GopherJS:
Build the software:
NOTE: GOOS can't be Darwin because GOPHERJS doesn't support it.
Tip: How to update modules
List out-of-date modules and update any that seem worth updating:
OLD WAY:
Last updated