Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

ci: add master branch to release action #2094

Merged
merged 12 commits into from
Jan 19, 2022
Merged

Conversation

davidmurdoch
Copy link
Member

No description provided.

@davidmurdoch davidmurdoch marked this pull request as ready for review January 18, 2022 22:29
@davidmurdoch davidmurdoch assigned cds-amal and unassigned cds-amal Jan 18, 2022
@davidmurdoch davidmurdoch requested a review from cds-amal January 18, 2022 22:29
@@ -76,7 +95,7 @@ jobs:
# this needs `--no-verify-access` until https://github.com/lerna/lerna/issues/2788 is fixed
- name: Release to npm
run: |
$(npm bin)/lerna publish from-package --yes --dist-tag ${GITHUB_REF##*/} --pre-dist-tag ${GITHUB_REF##*/} --no-verify-access
$(npm bin)/lerna publish from-package --yes --dist-tag ${TAG} --pre-dist-tag ${TAG} --no-verify-access
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cds-amal how does this line look to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IT looks ok to me as long as lerna is installed :) how did the action run?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ran! This step wasn't included in the test action because it has side effects.

echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Update package versions for latest release (master)
if: ${{ env.TAG == 'latest' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since after if: ${{ github.ref == 'refs/heads/master' }} we set the tag to 'latest', can't we just remove this if statement and include the following run: $(npm bin)/lerna version patch --no-git-tag-version --no-push --yes --exact inside of it?

Not particularly important, but could be a slight improvement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we could do that, and avoid these weird if: s would be kinda nice. The "step" would just be doing two things now. It'd be named something like "Set TAG for master to latest and update versions for master".

@davidmurdoch davidmurdoch changed the title chore: add master branch to release action ci: add master branch to release action Jan 18, 2022
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, pending tests outcome

@davidmurdoch davidmurdoch merged commit 0260386 into develop Jan 19, 2022
@davidmurdoch davidmurdoch deleted the master-release-automation branch January 19, 2022 00:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants