-
-
Notifications
You must be signed in to change notification settings - Fork 491
infra: #197/#240 create release using workflows #289
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
base: master
Are you sure you want to change the base?
Changes from 8 commits
d55234f
f15fe70
50a7993
30bdb97
eda578f
2935046
e42c18b
dc354bf
07555c5
c379803
a7b934f
3020c35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||
| name: Release package | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| tags: | ||||||
| - "v*.*.*" | ||||||
|
|
||||||
| jobs: | ||||||
| build: | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v6 | ||||||
|
|
||||||
| - name: Use Node.js ${{ matrix.node-version }} | ||||||
thompson-tomo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| uses: actions/setup-node@v6 | ||||||
| with: | ||||||
| node-version: 22.x | ||||||
| cache: 'npm' | ||||||
|
|
||||||
| - run: npm version ${{ github.ref_name }} --no-git-tag-version | ||||||
|
|
||||||
| - run: npm install | ||||||
|
|
||||||
| - run: npm test | ||||||
|
|
||||||
| - run: npm pack | ||||||
|
|
||||||
| - run: npm publish | ||||||
thompson-tomo marked this conversation as resolved.
Show resolved
Hide resolved
thompson-tomo marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| - name: Release | ||||||
| if: ${{ always() }} | ||||||
|
||||||
| if: ${{ always() }} | |
| if: ${{ success() }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a valid point, why would we publish the notes when the publish fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the github release contain the artifact's which could be manually uploaded to npm.
thompson-tomo marked this conversation as resolved.
Show resolved
Hide resolved
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| "author": "Thorsten Lorenz <[email protected]> (thlorenz.com)", | ||
| "name": "doctoc", | ||
| "description": "Generates TOC for markdown files of local git repo.", | ||
| "version": "2.2.0", | ||
| "version": "0.0.0-development", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this is a good idea, as based on my limited experience with Node.js app development, it doesn't appear to be a common practice.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me it is better and more efficient to use a clear placeholder value rather than having to either manually maintain the version value or adding more advanced ci pipelines given low volume of releases. Note this value is used purely for informational purposes as the git tag value is used to ensure they are aligned.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't love this either. It's standard practice for the What would it take to include bumping the version tag here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is still the case that the package version & git tags all match because at build time the value of the tag is set as the value. This means as a user they see no difference. The difficulty is if we have the trigger of a release being that a tag is added, how can we get that value to be set in the source code so that it matches. It would mean the tag is 1 commit behind. The common way to do it would be to raise a pr which bumps the version and when merged the release occurs. That would be a big change for such infrequent releases. |
||
| "repository": { | ||
| "type": "git", | ||
| "url": "git://github.com/thlorenz/doctoc.git" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.