Skip to content

Commit a834ac1

Browse files
committed
ci: update release process to use semantic-release
Create .releaserc to configure the plugins. Create package.json and package-lock.json to install dependencies.
1 parent 718c747 commit a834ac1

4 files changed

Lines changed: 7401 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1+
name: Release
2+
13
on:
24
push:
3-
# Sequence of patterns matched against refs/tags
4-
tags:
5-
- '\d+\.\d+\.\d+'
5+
branches:
6+
- main
67

7-
name: Publish to Pypi
8+
permissions:
9+
contents: read
810

911
jobs:
10-
deploy:
11-
name: Deploy to PYPI
12+
release:
13+
name: Release
1214
runs-on: ubuntu-latest
13-
environment:
14-
name: release
15-
url: https://pypi.org/p/metar-taf-parser-mivek/
1615
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
1719
id-token: write
1820
steps:
1921
- uses: actions/checkout@v4
20-
21-
- name: Set up Python
22+
with:
23+
fetch-depth: 0
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 'lts/*'
28+
cache: 'npm'
29+
- name: Setup Python
2230
uses: actions/setup-python@v5
2331
with:
2432
python-version: '3.11'
25-
2633
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
make install_deploy
30-
31-
- name: Build the archives
32-
run: |
33-
python -m build --sdist --wheel --outdir dist/
34-
35-
- name: Publish to PyPI
36-
uses: pypa/gh-action-pypi-publish@release/v1
34+
run: npm install
35+
- name: Run semantic-release
36+
run: npx semantic-release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }}

.releaserc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"release": {
3+
"branches": ["main"],
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
"@semantic-release/release-notes-generator",
7+
"@semantic-release/git",
8+
[
9+
"@semantic-release/changelog",
10+
{
11+
"changelogFile": "CHANGELOG.md"
12+
}
13+
],
14+
"@semantic-release-pypi",
15+
"@semantic-release/github",
16+
]
17+
}
18+
}

0 commit comments

Comments
 (0)