Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix release by installing conventional commit package #581

Merged
merged 6 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ on:
branches:
- "*"
jobs:
release:
name: Release
rules_task:
name: rules_task
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.head_ref }}

- uses: pnpm/action-setup@v2
with:
Expand All @@ -31,6 +32,18 @@ jobs:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.ONEPASSWORD_SERVICE_ACCOUNT_TOKEN_DEV }}
GH_TOKEN: "op://vgijssel-dev/semantic-release-setup/credential"

# From https://github.com/semantic-release/semantic-release/discussions/1886#discussioncomment-6899211
- name: Dry run release
run: |
unset GITHUB_ACTIONS
unset GITHUB_EVENT_NAME
pnpm exec semantic-release --dry-run --no-ci --branches $TARGET_BRANCH
if: ${{ github.event_name == 'pull_request' }}
working-directory: ./rules/rules_task
env:
TARGET_BRANCH: ${{ github.head_ref }}

- name: Run release
run: pnpm exec semantic-release
if: ${{ github.event_name == 'push' }}
working-directory: ./rules/rules_task
102 changes: 54 additions & 48 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,59 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"semanticCommits": "enabled",
"pip-compile": {
"fileMatch": ["(^|/)requirements\\.in$"]
},
"addLabels": ["dependencies"],
"constraints": {
"python": "<= 3.10"
},
"lockFileMaintenance": {
"enabled": true,
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
},
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"config": {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["mergeConfidence:all-badges", "config:recommended"],
"semanticCommits": "enabled",
"semanticCommitType": "chore",
"semanticCommitScope": "deps",
"pip-compile": {
"fileMatch": ["(^|/)requirements\\.in$"]
},
"addLabels": ["dependencies"],
"constraints": {
"python": "<= 3.10"
},
"lockFileMaintenance": {
"enabled": true,
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
}
],
"regexManagers": [
{
"fileMatch": ["(^|/)install_teleport\\.py$"],
"matchStrings": ["TELEPORT_VERSION = \"(?<currentValue>.*?)\""],
"depNameTemplate": "gravitational/teleport",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver-coerced"
}
],
"ruby": {
"enabled": false
},
"pip_requirements": {
"fileMatch": ["(^|/)requirements\\.in$"],
"ignorePaths": ["**/requirements.txt"]
},
"bazel-module": {
"enabled": true
},
"bazel": {
"fileMatch": ["(^|/)WORKSPACE\\.bzlmod$"]
},
"docker-compose": {
"fileMatch": ["(^|/)docker-compose\\.yml\\.j2$"]
},
"automergeSchedule": ["after 9am every weekday", "before 5pm every weekday"]
},
"packageRules": [
{
"matchCategories": ["ruby"],
"enabled": false
},
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
}
],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["(^|/)install_teleport\\.py$"],
"matchStrings": ["TELEPORT_VERSION = \"(?<currentValue>.*?)\""],
"depNameTemplate": "gravitational/teleport",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver-coerced"
}
],
"pip_requirements": {
"fileMatch": ["(^|/)requirements\\.in$"],
"ignorePaths": ["**/requirements.txt"]
},
"bazel-module": {
"enabled": true
},
"bazel": {
"fileMatch": ["(^|/)WORKSPACE\\.bzlmod$"]
},
"docker-compose": {
"fileMatch": ["(^|/)docker-compose\\.yml\\.j2$"]
},
"automergeSchedule": ["after 9am every weekday", "before 5pm every weekday"]
}
}
1 change: 1 addition & 0 deletions rules/rules_task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@semantic-release/exec": "^6.0.3",
"@semantic-release/github": "8.1.0",
"@semantic-release/release-notes-generator": "10.0.3",
"conventional-changelog-conventionalcommits": "^7.0.2",
"semantic-release": "^22.0.5",
"semantic-release-monorepo": "^7.0.5"
}
Expand Down
10 changes: 10 additions & 0 deletions rules/rules_task/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.