From 51332aa5b715e1deec3ea128d6c263519d22dea0 Mon Sep 17 00:00:00 2001 From: Adam Bovill Date: Mon, 24 Apr 2023 01:45:47 +0000 Subject: [PATCH] build: adds semantic release for deploy process --- .github/workflows/ci.yaml | 22 --------------------- .github/workflows/release.yaml | 35 ++++++++++++++++++++++++++++++++++ .node-version | 1 + .releaserc.json | 14 ++++++++++++++ 4 files changed, 50 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 .node-version create mode 100644 .releaserc.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 618e087..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: ci -on: - push: - branches: - - master - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..5ff6a39 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,35 @@ +name: Release +on: + push: + branches: + - main + - v.* +permissions: + contents: write +jobs: + deploy: + name: Release & Deploy to GitHub Pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache + - run: pip install mkdocs-material + - name: Semantic release + id: release + uses: cycjimmy/semantic-release-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }} + with: + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + @qiwi/semantic-release-gh-pages-plugin diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..55bffd6 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +18.15.0 diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..307882a --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,14 @@ +{ + "extends": "@open-turo/semantic-release-config", + "release": { + "branch": "main", + "plugins": [ + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + "@semantic-release/git", + "@semantic-release/github", + "@semantic-release/npm", + "@qiwi/semantic-release-gh-pages-plugin" + ] + } +}