From 067d49d6c7d00a15a5d9a95db703998bbf9331c8 Mon Sep 17 00:00:00 2001 From: Kai Volland Date: Mon, 8 Jul 2024 08:53:23 +0200 Subject: [PATCH] ci: update workflows --- .github/dependabot.yml | 13 ----------- .github/workflows/notify-discord.yml | 16 ++++++++++++++ .github/workflows/release.yml | 33 ++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 13 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/notify-discord.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index ecd4541..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Basic dependabot.yml file with -# minimum configuration for two package managers - -version: 2 -updates: - # Enable version updates for npm - - package-ecosystem: "npm" - # Look for `package.json` and `lock` files in the `root` directory - directory: "/" - # Check the npm registry for updates every day (weekdays) - schedule: - interval: "weekly" - versioning-strategy: increase-if-necessary diff --git a/.github/workflows/notify-discord.yml b/.github/workflows/notify-discord.yml new file mode 100644 index 0000000..76cec79 --- /dev/null +++ b/.github/workflows/notify-discord.yml @@ -0,0 +1,16 @@ +name: Discord notification + +on: + release: + types: [published] + +jobs: + discord-notification: + runs-on: ubuntu-latest + steps: + - name: Discord notification 📯 + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + uses: Ilshidur/action-discord@0.3.2 + with: + args: '${{ github.event.repository.name }} [${{ github.event.release.tag_name }}](${{ github.event.release.html_url }}) has been released. 🚀' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c74d7c3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + workflow_dispatch: + push: + branches: + - next + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout sources 🔰 + uses: actions/checkout@v4 + + - name: Setup Node.js 20 👷🏻 + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies ⏬ + run: npm ci + + - name: Build artifacts 🏗️ + run: npm run build + + - name: Release 🚀 + uses: cycjimmy/semantic-release-action@v4.1.0 + id: semantic + env: + GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file