diff --git a/.github/workflows/build_and_test_release.yml b/.github/workflows/build_and_test_release.yml index 169e341..2448bae 100644 --- a/.github/workflows/build_and_test_release.yml +++ b/.github/workflows/build_and_test_release.yml @@ -5,6 +5,7 @@ on: branches: [ main, next ] pull_request: branches: [ main, next ] + workflow_dispatch: jobs: build_test_common_os: @@ -24,7 +25,7 @@ jobs: - uses: extractions/setup-just@v3 - uses: hustcer/setup-nu@v3.19 with: - version: '0.85' + version: '0.105.1' - name: Just version run: just --version - name: Build @@ -35,7 +36,7 @@ jobs: name: Release runs-on: ubuntu-latest needs: [build_test_common_os] - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch' permissions: contents: write packages: write @@ -44,19 +45,21 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: main + fetch-depth: 0 - name: install npm uses: actions/setup-node@v4 with: - node-version: '16' - - - name: install @semantic-release/exec - run: npm install @semantic-release/exec + node-version: '20' - name: Semantic Release - uses: cycjimmy/semantic-release-action@v3 + uses: cycjimmy/semantic-release-action@v4 with: - branch: main + extra_plugins: | + @semantic-release/commit-analyzer + @semantic-release/release-notes-generator + @semantic-release/exec + @semantic-release/github env: GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }} CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} \ No newline at end of file diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..f90327f --- /dev/null +++ b/.releaserc @@ -0,0 +1,112 @@ +{ + "branches": [ + "main" + ], + "tagFormat": "${version}", + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "releaseRules": [ + { + "breaking": true, + "release": "minor" + }, + { + "revert": true, + "release": "patch" + }, + { + "type": "feat", + "release": "minor" + }, + { + "type": "fix", + "release": "patch" + }, + { + "type": "perf", + "release": "patch" + }, + { + "type": "docs", + "release": "patch" + }, + { + "emoji": ":racehorse:", + "release": "patch" + }, + { + "emoji": ":bug:", + "release": "patch" + }, + { + "emoji": ":penguin:", + "release": "patch" + }, + { + "emoji": ":apple:", + "release": "patch" + }, + { + "emoji": ":checkered_flag:", + "release": "patch" + }, + { + "tag": "BUGFIX", + "release": "patch" + }, + { + "tag": "FEATURE", + "release": "minor" + }, + { + "tag": "SECURITY", + "release": "patch" + }, + { + "tag": "Breaking", + "release": "minor" + }, + { + "tag": "Fix", + "release": "patch" + }, + { + "tag": "Update", + "release": "minor" + }, + { + "tag": "New", + "release": "minor" + }, + { + "component": "perf", + "release": "patch" + }, + { + "component": "deps", + "release": "patch" + }, + { + "type": "FEAT", + "release": "minor" + }, + { + "type": "FIX", + "release": "patch" + } + ] + } + ], + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "prepareCmd": "bash version_update.sh ${nextRelease.version}", + "publishCmd": "bash cargo_publish.sh" + } + ], + "@semantic-release/github" + ] +} \ No newline at end of file diff --git a/release.config.js b/release.config.js deleted file mode 100644 index b050a20..0000000 --- a/release.config.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - branches: ['main'], - tagFormat: '${version}', - plugins: [ - ['@semantic-release/commit-analyzer', { - releaseRules: [ - {breaking: true, release: 'minor'}, - {revert: true, release: 'patch'}, - {type: 'feat', release: 'minor'}, - {type: 'fix', release: 'patch'}, - {type: 'perf', release: 'patch'}, - {type: 'docs', release: 'patch'}, - {emoji: ':racehorse:', release: 'patch'}, - {emoji: ':bug:', release: 'patch'}, - {emoji: ':penguin:', release: 'patch'}, - {emoji: ':apple:', release: 'patch'}, - {emoji: ':checkered_flag:', release: 'patch'}, - {tag: 'BUGFIX', release: 'patch'}, - {tag: 'FEATURE', release: 'minor'}, - {tag: 'SECURITY', release: 'patch'}, - {tag: 'Breaking', release: 'minor'}, - {tag: 'Fix', release: 'patch'}, - {tag: 'Update', release: 'minor'}, - {tag: 'New', release: 'minor'}, - {component: 'perf', release: 'patch'}, - {component: 'deps', release: 'patch'}, - {type: 'FEAT', release: 'minor'}, - {type: 'FIX', release: 'patch'}, - ], - }], - '@semantic-release/release-notes-generator', - ['@semantic-release/exec', { - "prepareCmd": "bash version_update.sh ${nextRelease.version}", - "publishCmd": "bash cargo_publish.sh", - }], - '@semantic-release/github', - ], -}; \ No newline at end of file diff --git a/renovate.json b/renovate.json index 067588e..efa975a 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,8 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base"], + "extends": [ + "config:base" + ], "semanticCommits": "enabled", "semanticCommitType": "chore", "semanticCommitScope": "deps", @@ -8,14 +10,36 @@ "packageRules": [ { "description": "Automerge non-major updates", - "matchUpdateTypes": ["minor", "patch"], + "matchUpdateTypes": [ + "minor", + "patch" + ], "automerge": true }, { - "description": "Automerge actions", - "matchDepTypes": ["action"], - "matchUpdateTypes": ["major", "minor", "patch"], - "automerge": true + "description": "Automerge actions", + "matchDepTypes": [ + "action" + ], + "matchUpdateTypes": [ + "major", + "minor", + "patch" + ], + "automerge": true + } + ], + "regexManagers": [ + { + "fileMatch": [ + "^\\.github/workflows/[^/]+\\.ya?ml$" + ], + "matchStrings": [ + "uses: hustcer/setup-nu@.*?\\n.*?version: '\\s*(?.*?)'" + ], + "depNameTemplate": "nushell", + "datasourceTemplate": "github-releases", + "packageNameTemplate": "nushell/nushell" } ] } \ No newline at end of file