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

docs: Add examples for GitHub Actions #540

Merged
merged 5 commits into from
Mar 14, 2024

Conversation

GuiEpi
Copy link
Contributor

@GuiEpi GuiEpi commented Mar 10, 2024

Here is my proposal for the github action in the publishing section of the documentation.

Jobs

  1. Version
    Checks for changes in the package.json file. If there is a change, it retrieves the version of your extension.
  2. Submit
    Submits your extension to the store using the wxt submit command.

pnpm and npm code-group.

Here's a link to my CI Deploy to show you how it works.
I follow the pnpm continuous integration guide and your publishing section.

Copy link

netlify bot commented Mar 10, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 69d7016
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/65f2775e3ee9a80008cc1938
😎 Deploy Preview https://deploy-preview-540--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@aklinker1 aklinker1 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. Here's the workflow I was gonna add, for reference: https://github.com/aklinker1/github-better-line-counts/blob/main/.github/workflows/submit.yml

I guess I just forgot to add it? I wrote that a while ago.

It generates a changelog and github release based on conventional commits. I wonder what the best way to document different versioning strategies is?

docs/guide/publishing.md Outdated Show resolved Hide resolved
Comment on lines 150 to 154
```yml [npm]
env:
DIRECTORY: .output
PROJECT_NAME: myextension

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think we need multiple examples for package managers? Or should we just list one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did it, but I think it would be better to keep only pnpm.

Comment on lines 202 to 205
- name: Build extensions
run: |
npm run build &&
npm run build:firefox
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- name: Build extensions
run: |
npm run build &&
npm run build:firefox

Copy link
Contributor Author

@GuiEpi GuiEpi Mar 10, 2024

Choose a reason for hiding this comment

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

Sorry, I made a mistake above when I thought I was commenting on your answer.... I don't know if there's a way to undo that (I'm a bit new to the world of contribution).

@GuiEpi
Copy link
Contributor Author

GuiEpi commented Mar 10, 2024

Could there be a section called "on dispatch" and another called "on push"?

I also have a realease creation step that I had removed, but I can integrate it.

- name: Create Release
        uses: softprops/action-gh-release@v2
        env:
          GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
        with:
          tag_name: "v${{ needs.Version.outputs.version }}"
          name: "v${{ needs.Version.outputs.version }}"
          draft: false
          prerelease: false
          files: |
            ${{ env.DIRECTORY }}/${{env.PROJECT_NAME}}-${{ needs.Version.outputs.version }}-chrome.zip
            ${{ env.DIRECTORY }}/${{env.PROJECT_NAME}}-${{ needs.Version.outputs.version }}-firefox.zip
            ${{ env.DIRECTORY }}/${{env.PROJECT_NAME}}-${{ needs.Version.outputs.version }}-sources.zip

Your CI is very elaborate and I don't know if mine is really necessary..

@aklinker1
Copy link
Collaborator

aklinker1 commented Mar 12, 2024

Maybe we just list the two steps that are important (zip and submit), then link to each of our projects for full workflow examples?

@GuiEpi
Copy link
Contributor Author

GuiEpi commented Mar 13, 2024

I think it's a good idea, it could look like what I've pushed. Maybe a "tip" section isn't the right choice? Also, I may have been a bit too verbose.

Copy link
Collaborator

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

@GuiEpi I updated the wording a little bit, pulled the examples out of the info block, and listed the actual features of the two example workflows so it's more clear what the difference is.

Thanks for adding this for me!

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.40%. Comparing base (35269da) to head (69d7016).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #540      +/-   ##
==========================================
+ Coverage   86.31%   86.40%   +0.09%     
==========================================
  Files         111      111              
  Lines        8864     8864              
  Branches      873      876       +3     
==========================================
+ Hits         7651     7659       +8     
+ Misses       1199     1191       -8     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 changed the title docs: Add examples for github action docs: Add examples for GitHub Actions Mar 14, 2024
@aklinker1 aklinker1 merged commit e087a0d into wxt-dev:main Mar 14, 2024
17 checks passed
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.

None yet

2 participants