Skip to content
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

🤖 Pull Request form release/1.0.16 #60

Merged
merged 4 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- develop
- release/**
- hotfix/**
- support/**
- feature/**
defaults:
run:
shell: bash
Expand Down Expand Up @@ -55,16 +57,18 @@ jobs:
run: pnpm run test

- name: 📦 Build
if: startsWith(github.ref_name, 'release/') || startsWith(github.ref_name, 'hotfix/') || startsWith(github.ref_name, 'support/')
run: pnpm run build

- name: 🦋 Create Pull Request
if: startsWith(github.ref_name, 'release/') || startsWith(github.ref_name, 'hotfix/') || startsWith(github.ref_name, 'support/')
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
base: main
title: "Pull Request form Github Actions"
body: "This is a pull request created by Actions Robot 🤖"
commit-message: "Pull Request ${{ github.head_ref }} into main"
title: "🤖 Pull Request form ${{github.ref_name}}"
body: "created by Actions Robot 🤖"
commit-message: "Pull Request ${{ github.ref_name }} into main"
labels: "CI"
assignees: "guotingchao"
15 changes: 8 additions & 7 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,8 @@ jobs:
id: build-the-library
run: |
pnpm build
- name: test echo
run: |
echo ${{github.head_ref}}
echo ${{github.event_name}}
echo ${{github.ref_name}}
- name: 📣 Create Release Pull Request or Publish to npm
if: github.head_ref == 'changeset-release/main' && github.event_name == 'push'
- name: 📣 Create Release Pull Request and Publish new version to Npm
if: startsWith(github.head_ref, 'release/') && github.event_name == 'pull_request'
id: changesets
uses: changesets/[email protected]
with:
Expand All @@ -74,3 +69,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}
- name: 🎺 Publish new version to Github Packages
if: startsWith(github.head_ref, 'changeset-release/main') && github.event_name == 'pull_request'
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: "https://npm.pkg.github.com"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"access": "public",
"scope": "@cardbrother",
"tag": "latest",
"registry": "https://registry.npmjs.org/"
"registry": "https://registry.npmjs.org"
},
"bugs": {
"url": "https://github.com/guotingchao/nest-tencent-cloud-sdk/issues",
Expand Down