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: update workflows and add deploy workflow #672

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

DorianMazur
Copy link
Collaborator

Checks

Description

This pull request updates the actions in the existing workflows and introduces a new deploy workflow. The new workflow will prepack and release the package to npm.

@jsamr We need to add a new secret named NPM_TOKEN for this process.

@DorianMazur DorianMazur requested a review from jsamr September 24, 2024 11:19
@DorianMazur
Copy link
Collaborator Author

DorianMazur commented Sep 24, 2024

It looks like there's an issue with Codecov:

[2024-09-24T11:22:04.842Z] ['info'] Detected GitHub Actions as the CI provider.
[2024-09-24T11:22:05.052Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.8.0&token=*******&branch=ci%2Fupdate-workflows&build=11012682270&build_url=https%3A%2F%2Fgithub.com%2Fmeliorence%2Freact-native-render-html%2Factions%2Fruns%2F11012682270&commit=5f68c7378caaeab977e5fdacddd814c3259d9274&job=CI&pr=672&service=github-actions&slug=meliorence%2Freact-native-render-html&name=&tag=&flags=&parent=
[2024-09-24T11:22:05.[28](https://github.com/meliorence/react-native-render-html/actions/runs/11012682270/job/30579399823#step:11:29)7Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 4[29](https://github.com/meliorence/react-native-render-html/actions/runs/11012682270/job/30579399823#step:11:30) - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 241s."}

Could you add the Codecov token to the repository secrets as described here?

Alternatively, we could consider removing this action and switching to something like Jest Coverage Report.

@jsamr
Copy link
Collaborator

jsamr commented Sep 24, 2024

The entire release process today is with release-it. See

module.exports = {
git: {
commitMessage: 'chore: release v${version}',
// to release a changelog diff from a specific tag, uncoment
changelog: 'git log --pretty=format:"* %s (%h)" v6.1.0...${to}'
},
npm: {
publish: true
},
github: {
release: true
},
plugins: {
'@release-it/conventional-changelog': {
preset: 'angular',
infile: './CHANGELOG.md'
}
},
hooks: {
'after:release': './scripts/post-release.sh ${name} ${version}'
}
};

It entails the following:

  1. Publish a release to GitHub;
  2. Cut a release to NPM;
  3. Update the documentation website;
  4. Publish the discovery app to expo.

The version 6.4.0 was an accident; only the "publish to GitHub" part worked and I didn't find time to fix the currently broken release process.

I appreciate this PR, but I think we need a proper plan for a new release process first.

@jsamr
Copy link
Collaborator

jsamr commented Sep 24, 2024

@DorianMazur

Could you add the Codecov token to the repository secrets as described here?

I'm well aware our CI is broken; I am planning on fixing it this weekend; or you may want to take a look. Already did this in https://github.com/native-html/core; just look at recent commits for inspiration (I will have to configure the codecov app for this to work though, but I need approval from a Meliorence org admin, CC @Exilz)

@jsamr
Copy link
Collaborator

jsamr commented Sep 24, 2024

@DorianMazur To circumvent broken Codecov integration, you may toggle this flag:

- uses: codecov/codecov-action@v2
with:
file: ./packages/render-html/coverage/clover.xml # optional
fail_ci_if_error: true # optional (default = false)

@Exilz
Copy link
Contributor

Exilz commented Sep 24, 2024

@jsamr I don't have the rights on the repository anymore. I think @bd-arc is the only person who does now. Hopefully he can let you set up codecov 😄

@qwertychouskie
Copy link

@DorianMazur To circumvent broken Codecov integration, you may toggle this flag:

- uses: codecov/codecov-action@v2
with:
file: ./packages/render-html/coverage/clover.xml # optional
fail_ci_if_error: true # optional (default = false)

Might want to update codecov/codecov-action@v2 to v4 as well.

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.

4 participants