diff --git a/.github/workflows/release.beta.yml b/.github/workflows/release.beta.yml new file mode 100644 index 0000000..8d0b10e --- /dev/null +++ b/.github/workflows/release.beta.yml @@ -0,0 +1,22 @@ +name: Release (beta) +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' +jobs: + publish: + name: NPM Publish (beta) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm install --global npm@10 + - run: npm ci + - run: npm test + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + access: 'public' + tag: 'beta' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dc706d2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' +jobs: + release: + name: Github Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker://antonyurchenko/git-release:v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DRAFT_RELEASE: 'false' + PRE_RELEASE: 'false' + CHANGELOG_FILE: 'CHANGELOG.md' + ALLOW_EMPTY_CHANGELOG: 'false' + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm install --global npm@10 + - run: npm ci + - run: npm run docs + - uses: devops-infra/action-commit-push@v0.9.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_prefix: '[DOCS] ' + commit_message: ${{ github.ref_name }} + target_branch: 'master' + publish: + name: NPM Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm install --global npm@10 + - run: npm ci + - run: npm test + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + access: 'public' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d655d6d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test + +on: + push: + branches-ignore: + - 'master' + tags-ignore: + - '**' + +jobs: + Test: + name: Test Node.js ${{ matrix.node }} on ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node: ['20'] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - run: npm ci + - run: npm test diff --git a/package.json b/package.json index e1e6358..c9e9672 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { - "name": "s3-uploads", - "description": "", + "name": "@oneblink/uploads", + "description": "SDK for uploading various types of files to the OneBlink ecosystem", "version": "1.0.0", - "author": "OneBlink Developers", + "author": "OneBlink (https://oneblink.io)", + "bugs": { + "url": "https://github.com/oneblink/uploads/issues" + }, "devDependencies": { "@aws-sdk/client-s3": "^3.550.0", "@aws-sdk/lib-storage": "^3.550.0", @@ -21,8 +24,27 @@ "typedoc": "^0.25.13", "typescript": "^5.4.4" }, + "directories": { + "doc": "docs" + }, + "engines": { + "node": ">=20", + "npm": ">=10" + }, + "files": [ + "dist" + ], + "homepage": "https://github.com/oneblink/uploads", "license": "ISC", - "main": "index.js", + "main": "dist/index.js", + "module": "dist/index.js", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/oneblink/uploads.git" + }, "scripts": { "build": "tsc", "docs": "typedoc", diff --git a/src/typedoc.ts b/src/typedoc.ts new file mode 100644 index 0000000..ccb553f --- /dev/null +++ b/src/typedoc.ts @@ -0,0 +1,2 @@ +export * from './index' +export * from '@oneblink/types'