Skip to content

Commit 903f546

Browse files
authored
Merge pull request #39 from entelecheia/master
2 parents 5a857e8 + e4489b3 commit 903f546

File tree

6 files changed

+1015
-986
lines changed

6 files changed

+1015
-986
lines changed

.github/workflows/release-test.yaml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,53 @@ name: semantic-release-test
44
on:
55
workflow_call:
66
workflow_dispatch:
7-
pull_request:
7+
push:
88
branches:
9-
- release
10-
11-
permissions:
12-
contents: write
13-
issues: write
14-
pull-requests: write
9+
- test-release*
1510

1611
jobs:
17-
build:
18-
# Name the Job
19-
name: semantic-release-test
20-
# Set the agent to run on
21-
runs-on: ${{ matrix.os }}
22-
strategy:
23-
matrix:
24-
os: [ubuntu-latest]
25-
python-version: [3.9]
12+
release:
13+
runs-on: ubuntu-latest
14+
concurrency: release
15+
16+
permissions:
17+
id-token: write
18+
contents: write
2619

2720
steps:
28-
# Checkout the code base #
29-
- name: Checkout Code
21+
# Note: we need to checkout the repository at the workflow sha in case during the workflow
22+
# the branch was updated. To keep PSR working with the configured release branches,
23+
# we force a checkout of the desired release branch but at the workflow sha HEAD.
24+
- name: Setup | Checkout Repository at workflow sha
3025
uses: actions/checkout@v4
3126
with:
3227
fetch-depth: 0
28+
ref: ${{ github.sha }}
3329

34-
# set env variable
35-
- name: Set env variable
36-
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
37-
38-
# install poetry
39-
- name: Install poetry
40-
run: pipx install poetry>=1.3.2
30+
- name: Setup | Force correct release branch on workflow sha
31+
run: |
32+
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
4133
42-
# install dependencies
43-
- name: Install dependencies
44-
run: poetry install --with dev
34+
- name: Action | Semantic Version Release
35+
id: release
36+
# Adjust tag with desired version if applicable.
37+
uses: python-semantic-release/[email protected]
38+
with:
39+
build: true
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
git_committer_name: "github-actions"
42+
git_committer_email: "[email protected]"
43+
44+
- name: Publish | Upload package to TestPyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
if: steps.release.outputs.released == 'true'
47+
with:
48+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
49+
repository-url: https://test.pypi.org/legacy/
4550

46-
# semantic release
47-
- name: Python Semantic Release to PyPI
48-
run: |
49-
git config --global user.name "GitHub Actions"
50-
git config --global user.email "[email protected]"
51-
poetry run semantic-release publish --noop --verbosity=DEBUG --define=branch=${{ env.BRANCH }}
52-
env:
53-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
REPOSITORY_USERNAME: __token__
55-
REPOSITORY_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56-
# REPOSITORY_URL: https://test.pypi.org/legacy/
51+
- name: Publish | Upload to GitHub Release Assets
52+
uses: python-semantic-release/[email protected]
53+
if: steps.release.outputs.released == 'true'
54+
with:
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
tag: ${{ steps.release.outputs.tag }}

.github/workflows/release.yaml

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,55 @@ name: semantic-release
44
on:
55
workflow_call:
66
workflow_dispatch:
7-
workflow_run:
8-
workflows: ["lint & test"]
7+
push:
98
branches:
10-
- release
11-
types:
12-
- completed
13-
14-
permissions:
15-
contents: write
16-
issues: write
17-
pull-requests: write
9+
- release*
10+
paths:
11+
- "src/**"
12+
- "pyproject.toml"
1813

1914
jobs:
20-
build:
21-
# Name the Job
22-
name: semantic-release
23-
# check if the workflow result is success
24-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
25-
# Set the agent to run on
26-
runs-on: ${{ matrix.os }}
27-
strategy:
28-
matrix:
29-
os: [ubuntu-latest]
30-
python-version: [3.9]
31-
32-
# Load all steps #
15+
release:
16+
runs-on: ubuntu-latest
17+
concurrency: release
18+
19+
permissions:
20+
id-token: write
21+
contents: write
22+
3323
steps:
34-
# Checkout the code base #
35-
- name: Checkout Code
24+
# Note: we need to checkout the repository at the workflow sha in case during the workflow
25+
# the branch was updated. To keep PSR working with the configured release branches,
26+
# we force a checkout of the desired release branch but at the workflow sha HEAD.
27+
- name: Setup | Checkout Repository at workflow sha
3628
uses: actions/checkout@v4
3729
with:
3830
fetch-depth: 0
31+
ref: ${{ github.sha }}
3932

40-
# set env variable
41-
- name: Set env variable
42-
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
43-
44-
# install poetry
45-
- name: Install poetry
46-
run: pipx install poetry>=1.3.2
33+
- name: Setup | Force correct release branch on workflow sha
34+
run: |
35+
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
4736
48-
# install dependencies
49-
- name: Install dependencies
50-
run: poetry install --with dev
37+
- name: Action | Semantic Version Release
38+
id: release
39+
# Adjust tag with desired version if applicable.
40+
uses: python-semantic-release/[email protected]
41+
with:
42+
build: true
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
git_committer_name: "github-actions"
45+
git_committer_email: "[email protected]"
46+
47+
- name: Publish | Upload package to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
if: steps.release.outputs.released == 'true'
50+
with:
51+
password: ${{ secrets.PYPI_API_TOKEN }}
5152

52-
- name: Python Semantic Release to PyPI
53-
run: |
54-
git config --global user.name "GitHub Actions"
55-
git config --global user.email "[email protected]"
56-
poetry run semantic-release publish --verbosity=DEBUG --define=branch=${{ env.BRANCH }}
57-
env:
58-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
REPOSITORY_USERNAME: __token__
60-
REPOSITORY_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
53+
- name: Publish | Upload to GitHub Release Assets
54+
uses: python-semantic-release/[email protected]
55+
if: steps.release.outputs.released == 'true'
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
tag: ${{ steps.release.outputs.tag }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<!--next-version-placeholder-->
22

3+
## v2.0.5 (2024-08-18)
4+
5+
### Fix
6+
7+
* Update dependencies ([`d04bec3`](https://github.com/entelecheia/eKoNLPy/commit/d04bec33de97a22c2d88cb3b11524cc0eaaa0803))
8+
39
## v2.0.4 (2024-03-27)
410

511
### Fix

0 commit comments

Comments
 (0)