diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..69d5a5b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +# Doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + +on: + push: + branches: + - master + paths: + - 'dashboards/**/*.json' + # Allow this workflow to be manually triggered + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + # Doc: https://github.com/marketplace/actions/checkout + - name: Checkout ${{ github.repository }} + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Doc: https://github.com/marketplace/actions/setup-node-js-environment + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + # Doc: https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md + - name: Semantic Release + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + run: npx semantic-release diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..32f0e45 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,10 @@ +{ + "branches": [ + "master" + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github" + ] +}