-
Notifications
You must be signed in to change notification settings - Fork 9
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
npm publishing and deploying to cjquines.com #204
Open
pihart
wants to merge
9
commits into
cjquines:master
Choose a base branch
from
pihart:npm-publishing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6603030
`resizeCooldown` is a number
pihart 04f6cb6
fabric, react and other types should be a proper dependency
pihart f8165a6
Add `build:module` script for ts
pihart fecbdc1
Typescript should emit .d.ts files
pihart f3bcba3
files: tscdist
pihart 6b6146b
Add npm prepublish script and npm-publish.yml workflow
pihart 36cd8e3
Add semver.yml workflow
pihart cbf24ad
Change semver.yml escape hatch to `semver: no-semver`
pihart 4f728ec
Create cjquines-publish.yml
pihart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# From https://github.com/pihart/ts/blob/572ce179d629f2426ed4f9d7f262fb2e70d9fed6/.github/workflows/npm-publish.yml | ||
|
||
# This workflow will run tests using node and then publish a package to NPM when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Publish to cjquines.com | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm test --if-present | ||
- name: Create SSH key | ||
run: | | ||
install -m 600 -D /dev/null ~/.ssh/id_rsa | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts | ||
- name: Publish | ||
run: rsync -a dist/ ssh.phx.nearlyfreespeech.net:/home/public/qboard/ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# From https://github.com/pihart/ts/blob/572ce179d629f2426ed4f9d7f262fb2e70d9fed6/.github/workflows/npm-publish.yml | ||
|
||
# This workflow will run tests using node and then publish a package to NPM when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Publish to NPM | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm test --if-present | ||
- name: Publish | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# From https://github.com/pihart/ts/blob/572ce179d629f2426ed4f9d7f262fb2e70d9fed6/.github/workflows/semver.yml | ||
|
||
name: NPM SemVer | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
branches: [ main ] | ||
|
||
jobs: | ||
semver: | ||
runs-on: ubuntu-latest | ||
if: "github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'semver: no-semver')" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- run: | | ||
git config --global user.name 'Avi Mehra' | ||
git config --global user.email '[email protected]' | ||
- uses: pihart/[email protected] | ||
with: | ||
label-prefix: "Semver:" | ||
run-prefix: npm version | ||
items: | | ||
[ | ||
{ | ||
"label": "Major", | ||
"run": "major" | ||
}, | ||
{ | ||
"label": "Minor", | ||
"run": "minor" | ||
}, | ||
{ | ||
"label": "Patch", | ||
"run": "patch" | ||
}, | ||
{ | ||
"label": "Premajor", | ||
"run": "premajor" | ||
}, | ||
{ | ||
"label": "Preminor", | ||
"run": "preminor" | ||
}, | ||
{ | ||
"label": "Prepatch", | ||
"run": "prepatch" | ||
} | ||
] | ||
- run: | | ||
git push --follow-tags origin HEAD:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/coverage | ||
/dist | ||
/tscdist | ||
/node_modules | ||
npm-debug.log* | ||
deploy.sh | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"jsx": "react", | ||
"target": "ES2019", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
i don't think this directly works—post-build, the
href
s inindex.html
are relative to/
, which is incorrect, i think? we might need to add ahomepage
topackage.json
or do something else to get the righthref
s.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.
The hrefs/srcs should(?) all be flat; see https://github.com/pihart/qboard/blob/gh-pages/index.html
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.
ok. i think the rsync might want a
--delete
. but i'll test it. also, i think this actually needs ausername
as part of the secrets xp