diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 0000000..239977b --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,66 @@ +name: auto-update +run-name: Update npm dependencies + +on: + schedule: + - cron: '30 12 6,20 * *' + workflow_dispatch: + +permissions: + contents: write + +jobs: + update-deps: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'npm' + + - name: Update npm dependencies + run: | + npm version patch --no-git-tag-version + npm update + npm run build + npm run test --if-present + + - name: Commit and push changes + uses: EndBug/add-and-commit@v9 + with: + add: 'package*.json' + message: 'Bot: npm deps update' + + - name: Update npm dependencies + run: | + npm version patch --no-git-tag-version + npm update + npm run build + npm run test --if-present + + - uses: actions/upload-artifact@v4 + with: + name: build-artifacts + path: dist + + publish-npm: + needs: update-deps + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - uses: actions/download-artifact@v4 + with: + name: build-artifacts + path: dist + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/first-interaction-greetings.yml b/.github/workflows/first-interaction-greetings.yml new file mode 100644 index 0000000..c249752 --- /dev/null +++ b/.github/workflows/first-interaction-greetings.yml @@ -0,0 +1,42 @@ +name: first-interaction-greetings +run-name: First interaction greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - name: First interaction greetings + uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + πŸ‘‹ Hello! + + Welcome to the repository, and thank you for opening an issue. πŸŽ‰ We're excited to have you contribute! Please make sure to include all the relevant details to help us understand your report or suggestion. + + If you’re new here, take a moment to review our [contribution guidelines](./CONTRIBUTING.md) and [code of conduct](./CODE_OF_CONDUCT.md). These documents will help you collaborate effectively and ensure a positive experience for everyone. + + We're here to helpβ€”feel free to reach out if you have any questions. πŸš€ + + Thank you, and happy coding! πŸ’» + pr-message: | + πŸ‘‹ Hi! + + Welcome, and thank you for opening your first pull request with us! πŸŽ‰ We're thrilled to see your contribution. + + Before we review, please ensure that: + - You've followed the [contribution guidelines](./CONTRIBUTING.md). + - Your changes are thoroughly tested and documented (if applicable). + - The PR description includes all necessary details for the reviewers. + + Our team will review your submission as soon as possible. In the meantime, feel free to ask any questions or provide additional context to help with the review process. + + We appreciate your effort and look forward to collaborating with you! πŸš€ + + Cheers, + The Team ❀️ diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml old mode 100755 new mode 100644 index c23c172..6e51a4c --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,6 +1,8 @@ -name: NPM Publish +name: npm-publish +run-name: NPM build, test and publish on: + workflow_dispatch: push: branches: [ "main" ] paths: @@ -22,35 +24,13 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci - - run: npm run build --if-present + - run: npm run build - run: npm run test --if-present - uses: actions/upload-artifact@v4 with: name: build-artifacts path: dist - # publish-gpr: - # needs: build - # runs-on: ubuntu-latest - # permissions: - # contents: read - # packages: write - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-node@v3 - # with: - # node-version: 20 - # - uses: actions/download-artifact@v4 - # with: - # name: build-artifacts - # path: dist - # - run: | - # npm config set registry "https://npm.pkg.github.com/" - # npm config set scope "@${{ github.repository_owner }}" - # npm publish - # env: - # NODE_AUTH_TOKEN: ${{ github.token }} - publish-npm: needs: build runs-on: ubuntu-latest