Skip to content

Commit

Permalink
fix: 102 fix loadedmessage is not cleared after messages handled (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 authored Nov 1, 2024
2 parents 6193485 + e684736 commit 59cf172
Show file tree
Hide file tree
Showing 12 changed files with 305 additions and 198 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dependabot-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GH_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
skip-commit-verification: true
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
fi
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: |
npm run test
Expand All @@ -52,10 +52,10 @@ jobs:
echo "::set-output name=pr_url::$PR_URL"
env:
PR_BASE_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge aggregated PRs
if: steps.aggregate_prs.outputs.pr_url != ''
run: |
gh pr merge --auto --merge ${{ steps.aggregate_prs.outputs.pr_url }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117 changes: 0 additions & 117 deletions .github/workflows/deploy-ci.yaml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/deploy-develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release and Publish (Develop)
on:
push:
branches:
- develop

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
Test:
uses: ./.github/workflows/test.yaml

Publish:
needs: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create Directory
run: mkdir -p ./lib ./node_modules

- name: Download the build artifact
uses: actions/download-artifact@v4
with:
name: cache
path: ./

- name: Build
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: npm ci

- name: Semantic Release (Dry Run)
run: npm run semantic-release:dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Semantic Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

55 changes: 55 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release and Publish
on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
Test:
uses: ./.github/workflows/test.yaml

Publish:
needs: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create Directory
run: mkdir -p ./lib ./node_modules

- name: Download the build artifact
uses: actions/download-artifact@v4
with:
name: cache
path: ./

- name: Build
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: npm ci

- name: Semantic Release (Dry Run)
run: npm run semantic-release:dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Semantic Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Document:
needs: Publish
uses: ./.github/workflows/docs.yaml

89 changes: 89 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Publish Docs
on:
workflow_dispatch:
workflow_call:
permissions:
contents: write

jobs:
History:
runs-on: ubuntu-latest
steps:
- name: Get the gh-pages repo
uses: actions/checkout@v4
with:
ref: gh-pages

- name: TAR the existing docs
run: |
mkdir -p ./docs
tar -cvf documentation.tar ./docs
- name: Create a document artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: documentation.tar
Build:
needs: History
runs-on: ubuntu-latest
steps:
- name: Checkout src
uses: actions/checkout@v4

- name: Create Directory
run: mkdir -p ./docs

- name: Download the existing documents artifact
uses: actions/download-artifact@v4
with:
name: documentation

- run: tar -xf documentation.tar ./docs -C ./docs

- name: Build
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install NPM
run: npm install --ignore-scripts

- name: Build Documents
run: npm run typedoc

- name: Tar the new docs
run: tar -cvf newdocumentation.tar ./docs

- name: Create a new document artifact
uses: actions/upload-artifact@v4
with:
name: newdocumentation
path: newdocumentation.tar
Commit:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Checkout the gh-pages repo
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Create Directory
run: mkdir -p ./docs

- name: Download the new documents artifact
uses: actions/download-artifact@v4
with:
name: newdocumentation

- name: Extract Tar
run: tar -xf newdocumentation.tar ./docs -C ./docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
46 changes: 0 additions & 46 deletions .github/workflows/pr-unit-tests.yml

This file was deleted.

Loading

0 comments on commit 59cf172

Please sign in to comment.