Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: release workflow #106

Merged
merged 13 commits into from
Jul 3, 2024
Merged

Conversation

AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Jun 28, 2024

Adds scripts for performing releases.

  • Start by running Prepare release PR workflow:
  • The opened PR will run CLI Integration tests (this doesn't trigger automatically on my fork though, let's re-check this on first real release 🤔)
  • Merging this PR will trigger another workflow that updates versions in templates, runs CLI integration tests (once again just to be sure) and finally publishes NPM package

Copy link

stackblitz bot commented Jun 28, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@AriPerkkio AriPerkkio force-pushed the ci/publish-scripts branch 2 times, most recently from dd152ad to 29da35d Compare July 1, 2024 08:58
@AriPerkkio AriPerkkio force-pushed the ci/publish-scripts branch 2 times, most recently from 24b3bf5 to df1bca6 Compare July 1, 2024 09:13
Comment on lines +12 to +14
permissions:
contents: write
id-token: write
Copy link
Member Author

Choose a reason for hiding this comment

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

These are required for --provenance flag.

Comment on lines +35 to +36
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

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

We'll need to manually add this secret to the project.

Copy link
Member

Choose a reason for hiding this comment

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

@d3lm I think if you can add @stackblitz-gitops to the packages, then we should be able to reuse the token of @stackblitz-gitops.

@apai4 Do you think that would be fine? Or should we have a different token?

Copy link
Contributor

Choose a reason for hiding this comment

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

I pinged Pai about this because I cannot add NPM access tokens since I don't have permissions to generate them.

Copy link
Member

Choose a reason for hiding this comment

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

I'll create a new token for stackblitz-devops on NPM for this repo and add it to secrets.NPM_TOKEN. stackblitz-devops will need write access to the NPM package.

Copy link
Member

Choose a reason for hiding this comment

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

The token has been created and added to the repo. Let me know if it works once stackblitz-gitops is granted access

Copy link
Member

Choose a reason for hiding this comment

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

@d3lm can you grant access to stackblitz-gitops on all the packages?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I can do that!

Copy link
Contributor

Choose a reason for hiding this comment

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

Invite is out. I think @apai4 needs to accept it.

Copy link
Member Author

Choose a reason for hiding this comment

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

@d3lm do you have permissions to check if this is completed now? Publish step failed at https://github.com/stackblitz/tutorialkit/actions/runs/9791481416/job/27035364611

@AriPerkkio AriPerkkio marked this pull request as ready for review July 1, 2024 09:20
@AriPerkkio
Copy link
Member Author

AriPerkkio commented Jul 1, 2024

Need to recheck the integration tests again. They started to fail for me locally after rebase. Would appreciate if someone else could also try them locally. 🙌

Copy link
Member

@Nemikolh Nemikolh left a comment

Choose a reason for hiding this comment

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

Looks really good! 💪

packages/cli/src/commands/create/index.ts Outdated Show resolved Hide resolved
integration/cli/create-tutorial.test.ts Show resolved Hide resolved
.github/workflows/prepare-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
.github/actions/resolve-release-version/action.yml Outdated Show resolved Hide resolved
.github/workflows/prepare-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

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

Left a few minor comments. Great work @AriPerkkio 👏

.github/actions/setup-and-build/action.yml Outdated Show resolved Hide resolved
.github/workflows/prepare-release.yaml Outdated Show resolved Hide resolved
.github/workflows/integration-test-cli.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
integration/cli/create-tutorial.test.ts Show resolved Hide resolved
packages/cli/scripts/update-template.js Outdated Show resolved Hide resolved
packages/cli/scripts/update-template.js Outdated Show resolved Hide resolved
packages/cli/src/commands/create/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@Nemikolh Nemikolh left a comment

Choose a reason for hiding this comment

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

Fantastic work on this @AriPerkkio ! 😃 👏

Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

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

Awesome work! Only minor remarks.

.github/workflows/prepare-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
.github/workflows/publish-release.yaml Outdated Show resolved Hide resolved
integration/cli/__snapshots__/npm-created.json Outdated Show resolved Hide resolved
integration/cli/__snapshots__/pnpm-created.json Outdated Show resolved Hide resolved
integration/cli/__snapshots__/yarn-created.json Outdated Show resolved Hide resolved
@Nemikolh Nemikolh requested a review from d3lm July 3, 2024 09:39
Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

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

Great work 💪 👏 🔥

@Nemikolh Nemikolh merged commit 559b8e4 into stackblitz:main Jul 3, 2024
8 checks passed
@AriPerkkio AriPerkkio deleted the ci/publish-scripts branch July 3, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants