diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..f0b1bdc9c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + workflow_dispatch: + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache-dependency-path: '**/.github/workflows/release.yml' + cache: 'npm' + check-latest: true + node-version: '16' + + - name: Fetch dependencies + run: | + npm install --no-package-lock \ + @semantic-release/changelog @semantic-release-plus/docker @semantic-release/exec @semantic-release/git \ + conventional-changelog-eslint @google/semantic-release-replace-plugin + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # - name: Build Docker image + # run: docker buildx --load build --tag vladdoster/dotfiles:latest . + + - name: Generate release + run: npx semantic-release --ci -- + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GIT_AUTHOR_EMAIL: 'mvdoster@gmail.com' + GIT_AUTHOR_NAME: 'Vladislav Doster' + GIT_COMMITTER_EMAIL: 'mvdoster@gmail.com' + GIT_COMMITTER_NAME: 'Vladislav Doster' diff --git a/.releaserc.json b/.releaserc.json index 4f6689087..2280b377b 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,40 +1,44 @@ { "repositoryUrl": "https://github.com/zdharma-continuum/zinit.git", + "branches": [ + "main" + ], "plugins": [ + [ "@semantic-release/commit-analyzer", { } ], [ - "@semantic-release/commit-analyzer", + "@google/semantic-release-replace-plugin", { - "preset": "eslint", - "releaseRules": [ - { "tag": "chore", "release": "patch" }, - { "tag": "ci", "release": "false" }, - { "tag": "docs", "release": "patch" }, - { "tag": "fix", "release": "patch" }, - { "tag": "feat", "release": "minor" }, - { "tag": "maint", "release": "patch" }, - { "tag": "new", "release": "minor" }, - { "tag": "style", "release": "patch" }, - { "tag": "refactor", "release": "major" }, - { "tag": "update", "release": "minor" } - ] - } - ], - ["@google/semantic-release-replace-plugin", { "replacements": [ { - "files": ["VERSION"], + "files": [ + "VERSION" + ], "from": "^([0-9]).+([0-9]).+([0-9])$", "to": "${nextRelease.version}", - "results": [ { "file": "VERSION", "hasChanged": true } + "results": [ + { + "file": "VERSION", + "hasChanged": true + } ] } ] } ], - ["@semantic-release/release-notes-generator", { "preset": "eslint" }], - ["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" } ], - ["@semantic-release/git", { - "assets": ["CHANGELOG.md", "VERSION"], + [ "@semantic-release/release-notes-generator", { } ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md", + "VERSION" + ], "message": "release: v${lastRelease.version} → v${nextRelease.version}\n\n${nextRelease.notes}" } ], diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb..07db8e557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# [v3.7.0](https://github.com/zdharma-continuum/zinit/compare/v3.1...v3.7.0)