From b034a5679ce59a66e8c20d612ad0ac70b0c94414 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 24 Mar 2025 12:39:15 +0100 Subject: [PATCH] chore(github): improve workflows --- .github/workflows/{ci-dev.yml => module.yml} | 6 ++--- .github/workflows/{ci.yml => release.yml} | 16 ++++++++------ .github/workflows/stale.yml | 23 -------------------- 3 files changed, 12 insertions(+), 33 deletions(-) rename .github/workflows/{ci-dev.yml => module.yml} (96%) rename .github/workflows/{ci.yml => release.yml} (85%) delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/module.yml similarity index 96% rename from .github/workflows/ci-dev.yml rename to .github/workflows/module.yml index a4668975..253cfff5 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/module.yml @@ -1,4 +1,4 @@ -name: ci-dev +name: module on: push: @@ -9,7 +9,7 @@ on: - v2 jobs: - ci: + build: runs-on: ${{ matrix.os }} permissions: @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] # macos-latest, windows-latest - node: [20] + node: [22] env: NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/release.yml similarity index 85% rename from .github/workflows/ci.yml rename to .github/workflows/release.yml index 3c72438d..18db731a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,20 @@ -name: ci-main +name: release on: push: - branches: - - main + tags: + - '*' jobs: - ci: + publish: + if: ${{ github.ref == 'refs/heads/v2' }} + runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] # macos-latest, windows-latest - node: [20] + node: [22] env: NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }} @@ -54,8 +56,8 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Release - if: github.event_name == 'push' && steps.check.outputs.changed == 'true' + - name: Publish + if: steps.check.outputs.changed == 'true' run: ./scripts/release.sh env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 637ec4ee..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: stale - -on: - schedule: - - cron: '30 1 * * *' - -jobs: - stale: - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - steps: - - uses: actions/stale@v9 - with: - exempt-issue-labels: triage,v3 - stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.' - stale-issue-label: stale - stale-pr-label: stale - days-before-stale: 30 - days-before-close: -1