Skip to content

Commit

Permalink
ci: Use semantic-release (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblanchette authored May 3, 2024
1 parent 4cbaa19 commit 98fa390
Show file tree
Hide file tree
Showing 7 changed files with 8,003 additions and 35 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/publish_to_pypi.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on:
push:
branches: [ main ]

permissions:
contents: write

jobs:
semantic-release:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install semantic-release
shell: bash
run: npm install
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Release
shell: bash
env:
PYPI_USERNAME: 'coveo'
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: npx semantic-release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,6 @@ include
tmp

docs/examples/.DS_Store

# npm stuff
node_modules/
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
32 changes: 32 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"semantic-release-pypi",
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
"assets": ["pyproject.toml", "CHANGELOG.md"]
}
]
]
}
Loading

0 comments on commit 98fa390

Please sign in to comment.