Skip to content

Commit

Permalink
πŸ€– Pull Request form develop (#92)
Browse files Browse the repository at this point in the history
* πŸ“° Update CI

- Added changeset for patch update
- Updated workflow to trigger on pull requests
- Renamed job from 'Release' to 'Publish'

* feat(CI&CD): ✨ push new workflow

* ci(CI&CD): 🎑 cI

* feat(new feature): ✨ add ci

* ci(CI&CD): 🎑 cI

* feat(new feature): ✨ add sts support

* Add GIthubPackage config

* πŸ“ Update README with Tencent STS usage

- Added code snippets for using Tencent STS
- Updated README and README_ZH files

---------

Co-authored-by: guozichun <[email protected]>
  • Loading branch information
github-actions[bot] and guotingchao authored May 10, 2024
1 parent 35eb59a commit e7252b4
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-starfishes-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

Add STS support
5 changes: 5 additions & 0 deletions .changeset/few-insects-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update workflow
5 changes: 5 additions & 0 deletions .changeset/funny-ties-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update ci
5 changes: 5 additions & 0 deletions .changeset/lovely-horses-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update CI
5 changes: 5 additions & 0 deletions .changeset/ninety-ducks-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update readme
5 changes: 5 additions & 0 deletions .changeset/perfect-emus-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update ci
5 changes: 5 additions & 0 deletions .changeset/wicked-bananas-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

update ci
4 changes: 2 additions & 2 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
Publish:
name: πŸš€ Publish
if: github.repository_owner == 'guotingchao'
if: github.repository_owner == 'guotingchao'
# && github.event.pull_request.merged == true && github.head_ref == 'changeset-release/main' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ env.PAT }}
registry: "https://npm.pkg.github.com"
registry: "https://npm.pkg.github.com/guotingchao"

- if: ${{ steps.publish.outputs.type }}
run: echo "Version changed!"
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,34 @@ cosClient.upload({
});
```

#### **Usage Tencent STS**

```ts
const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});



#### πŸ“ [CHANGELOG](CHANGELOG.md)

#### License [MIT](https://github.com/guotingchao/nest-tencent-cloud-sdk/blob/main/LICENSE)
```
28 changes: 28 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,34 @@ cosClient.upload({
});
```

#### **使用 Tencent STS**

```ts
const sts_client = await tencentCloudService.useClient(
TencentCloudClientType.STS,
);
expect(sts_client).toBeDefined();
expect(sts_client).toBeInstanceOf(StsProvider);
const tempSignature = await sts_client.createTemporary({
Name: 'Test',
Policy: encodeURI(
JSON.stringify({
version: '2.0',
statement: [
{
effect: 'allow',
action: ['name/cos:PutObject'],
resource: ['*'],
},
],
}),
),
DurationSeconds: 1800,
});



#### πŸ“ [CHANGELOG](CHANGELOG.md)

#### License [MIT](https://github.com/guotingchao/nest-tencent-cloud-sdk/blob/main/LICENSE)
```

0 comments on commit e7252b4

Please sign in to comment.