Skip to content

Publishing a New Version

jonsnyder edited this page Apr 3, 2023 · 15 revisions

Only Adobe employees are eligible to publish new versions.

Initialize a version

  1. Navigate to the Initialize Intended Release Workflow on GitHub. Click "Run workflow". Choose "main" as the branch, and type in the appropriate release type (major, minor, or patch).
  2. Wait for the workflow to complete.

Release alpha versions

  1. Skip to next section if all features for the release have already been merged.
  2. Navigate to the Release Project. Drag the card that was just created from the "New" column to the "Alpha" column. Alpha releases are used before the planned version is feature complete. This step can be skipped if the version is already feature complete.
  3. Ensure the deploy action completes successfully.
  4. Test features and fix any bugs with pull requests. New commits on main will trigger a new alpha version automatically.

Release beta versions

  1. Navigate to the Release Project. Drag the release card to the "Beta" column. Beta releases are used when the planned version is feature complete.
  2. Ensure the deploy action completes successfully.
  3. Check the release notes on GitHub for the alpha and beta releases. Remove anything that shouldn't be user facing by adding the label "ignore-for-release" to the PRs. Update the title of any other PRs with something that is user facing (try to use past tense.) For any releases that should be updated, you can re-generate the release notes by: edit the release, delete the existing notes, click the auto-generate button, click save.
  4. Ping Vlad Falon on the alloy-docs slack channel with a link to the release notes on GitHub, along with the intended release date. Ask him to create a release notes PR.
  5. Test features and fix any bugs with pull requests. New commits on main will trigger a new alpha version automatically.

Release the production version

  1. Ensure the release notes have been merged and any documentation for released features.
  2. Navigate to the Release Project. Drag the release card to the "Release" column.
  3. Navigate to the Actions tab. Approve the production deployment.
  4. Ensure the deploy action completes successfully.

Congratulations! You've published a new version. Now, be sure to release a new version of the Launch extension.

Troubleshooting

In the unlikely event of a failure during a deploy, the deploy script can be re-run. Simply manually start the "deployRelease" workflow with the correct version number. The deploy script has been built to check at each step to see if that step has already run successfully, so rerunning the script is safe. Alternately, for "alpha" or "beta" releases, you can manually run the "Trigger Deployment" workflow to release an incremented prerelease version.

If the release process is still not working, follow the manual steps below:

  1. Make sure you don't have an active release card (i.e. a card in the Alpha or Beta columns). We don't want the commits from these manual steps to trigger a new release.
  2. Make sure you're on the main branch and have pulled the latest changes.
  3. Run npm ci to ensure you have the latest dependencies.
  4. Version and tag Alloy by running npm version major/minor/patch --git-tag-version=false. Whether you use major, minor, or patch depends on what has changed since the last release and how that matches semantic versioning. We don't want to tag the version because we need to update the dev dependency in package.json so that the automated tests run against the correct NPM version.
  5. Run git add package.json package-lock.json.
  6. Run git commit -m "${version}" where ${version} is the version
  7. Run git push origin main.
  8. We do not have a manual method for updating NPM. If GitHub Actions are not working, and you absolutely need to release, contact Simon Macdonald for assistance. The @adobe org secret required for uploading to NPM is shared to the repo, but we cannot access it outside of a Github workflow. There is a workflow that you can use to publish to NPM. Navigate to the Publish to NPM workflow action, and click the Run Workflow button, selecting 'main' as the branch.
  9. Run npm install @adobe/alloy@${version} --save-dev replacing ${version} with the new version.
  10. Run git add package.json package-lock.json
  11. Run git commit -m "update self devDependency to ${version}" replacing ${version}
  12. Run git push origin main
  13. Run git tag -a "v${version}" -m "${version}" replacing ${version}
  14. Run git push origin v${version}
  15. Run npm run build
  16. Obtain Akamai NetStorage Upload capabilities by sending a request to Jeffrey Walter or Joel Stachowicz and include your public RSA key. This is normally found in ~/.ssh/id_rsa.pub. If you don't have a key, you'll need to generate one by running ssh-keygen -t rsa -b 2048 -C "[email protected]". (NetStorage only works with 2048 bit key length).
  17. Run sftp -oHostKeyAlgorithms=+ssh-dss -oStrictHostKeyChecking=no [email protected]:/prod/alloy
  18. In the sftp prompt, run mkdir ${version}, cd ${version}, put ./dist/alloy.js, put ./dist/alloy.min.js, and bye replacing ${version}.
  19. Ensure the files are available on the CDN. https://cdn1.adoberesources.net/alloy/${version}/alloy.js, and https://cdn1.adoberesources.net/alloy/${version}/alloy.min.js
  20. Navigate to Draft a new release.
  21. Type the version number in the tag field.
  22. Type a title and description for the release.
  23. Add alloy.js and alloy.min.js files from the ./dist directory.