Skip to content

Commit

Permalink
Merge pull request #24 from Cherry/chore/bump-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry authored Jun 30, 2024
2 parents 7d410ea + 1da84c7 commit 51bae94
Show file tree
Hide file tree
Showing 11 changed files with 1,549 additions and 927 deletions.
19 changes: 3 additions & 16 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
{
"root": true,
"extends": [
"@nodecraft",
"plugin:@typescript-eslint/recommended"
"@nodecraft/eslint-config/typescript"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"json"
],
"rules": {
"no-var": "error",
"prefer-const": "error",
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-import": "off"
},
"parserOptions": {
"allowImportExportEverywhere": true,
"ecmaVersion": 2020,
"ecmaFeatures": {
"impliedStrict": true
},
"sourceType": "module"
"n/no-unsupported-features/node-builtins": "off"
}
}
}
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test

deploy:
Expand All @@ -54,15 +55,13 @@ jobs:
- run: npm ci

- name: Publish
- name: Deploy
# only publish if a direct `push`/`repository_dispatch`
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@v3.6.1
if: github.event_name == 'repository_dispatch' || github.event_name == 'push'
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: publish
secrets: |
AUTH_KEY
env:
NODE_ENV: production
AUTH_KEY: ${{ secrets.AUTH_KEY }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ https://watch.videodelivery.net/3fb9e86deffbd4351b9187db92136ef5
- Generate a random string of characters - this will be used for an `AUTH_KEY` header that we'll send along with ShareX
- This ensures that only you can upload to your script
- In your GitHub repository, create an `AUTH_KEY` secret, and set its value to the `AUTH_KEY` you just generated
- This will be used by the GitHub Action to publish the worker
- This will be used by the GitHub Action to deploy the worker
- In your GitHub repository, create a `CF_API_TOKEN` secret, and set its value to a Cloudflare API token with the following permissions:
- Account - Workers R2 Storage - Edit
- Account - Workers Tail - Read
Expand All @@ -34,7 +34,7 @@ https://watch.videodelivery.net/3fb9e86deffbd4351b9187db92136ef5
![Cloudflare API token for Wrangler R2 access](https://r2-sharex.jross.me/file/2022/03/f8a40b17-9005-4645-9fdb-1803085308d0.png)

- If using GitHub Actions (like this repo), simply push your changes and the worker will be automatically deployed - see your Actions log for any errors.
- (optional) If you want to publish manually, or use some other CI other than GitHub Actions, you will need to manually setup the `AUTH_KEY` secret (via the Workers UI, or `wrangler secret put`), and then run `npm run publish`.
- (optional) If you want to deploy manually, or use some other CI other than GitHub Actions, you will need to manually setup the `AUTH_KEY` secret (via the Workers UI, or `wrangler secret put`), and then run `npm run deploy`.


## ShareX Setup
Expand Down
Loading

0 comments on commit 51bae94

Please sign in to comment.