forked from vadimdemedes/google-images
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- es6 rewrite - use of urlsearchparams instead of querystring (querystring is deprecated in favor of urlsearchparams) - use of axios instead of got (got <11.8.5 allows a redirect to a UNIX socket)
- Loading branch information
1 parent
93b76e5
commit 4afdb3b
Showing
10 changed files
with
3,741 additions
and
147 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: npm-publish | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
npm-publish: | ||
name: npm-publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Publish to Node Package Manager | ||
- name: Checkout Repo | ||
uses: actions/checkout@main | ||
|
||
- name: Setup Node.js (NPM) | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Use cached node_modules | ||
uses: actions/cache@master | ||
with: | ||
path: node_modules | ||
key: nodeModules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
nodeModules- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Update Publish Config | ||
run: sed -i 's^registry-url^registry.npmjs.org^' package.json | ||
|
||
- name: Publish to NPM | ||
run: npm publish --access public | ||
env: | ||
CI: true | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
gpr-publish: | ||
name: gpr-publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Publish to GitHub Package Registry | ||
- name: Checkout Repo | ||
uses: actions/checkout@main | ||
|
||
- name: Store lowercase actor name | ||
run: | | ||
echo 'actor_name<<EOF' >> $GITHUB_ENV | ||
echo ${{ github.actor }} | tr "A-Z" "a-z" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- name: Store package name | ||
run: | | ||
echo 'package_name<<EOF' >> $GITHUB_ENV | ||
grep -Po '"name": *\K"[^"]*"' package.json | grep -oP '"\K[^"\047]+(?=["\047])' >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- name: Setup Node.js (GPR) | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: '12.x' | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '${{ env.actor_name }}' | ||
|
||
- name: Use cached node_modules | ||
uses: actions/cache@master | ||
with: | ||
path: node_modules | ||
key: nodeModules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
nodeModules- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Update Package Name | ||
run: | | ||
sed -i 's,"name": "${{ env.package_name }}","name": "@${{ env.actor_name }}/${{ env.package_name }}",' package.json | ||
cat package.json | ||
- name: Update Publish Config | ||
run: | | ||
sed -i 's^registry-url^npm.pkg.github.com/@${{ env.actor_name }}^' package.json | ||
cat package.json | ||
- name: Publish to GitHub Package Registry | ||
run: npm publish --access public | ||
env: | ||
CI: true | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*Zone.Identifier | ||
.DS_Store | ||
node_modules | ||
.cache | ||
.vscode |
This file was deleted.
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
Binary file not shown.
Oops, something went wrong.