Skip to content

Commit a41a7c4

Browse files
committed
Merge branch 'release/v1.3.0'
2 parents 4bae443 + 228c4d1 commit a41a7c4

File tree

6 files changed

+253
-63
lines changed

6 files changed

+253
-63
lines changed

.gitignore

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [Unreleased]
5+
6+
## [1.3.0] - 2024-12-24
7+
### Added
8+
- Output the changelog of last version.
9+
### Fixed
10+
- Add output `minor-tag` to action metadata.
11+
412
## [1.2.0] - 2024-01-16
513
### Added
614
- Minor tag.
715
### Changed
8-
- Major tag of major version 0.
16+
- Major tag of major version 0 is no longer created or moved.
917
### Fixed
1018
- Templates using multiple parameters work as expected now.
1119

@@ -26,7 +34,7 @@ All notable changes to this project will be documented in this file.
2634
### Added
2735
- First release.
2836

29-
[1.2.2]: https://github.com/lumynou5/github-release-action/releases/tag/v1.2.0
37+
[1.2.0]: https://github.com/lumynou5/github-release-action/releases/tag/v1.2.0
3038
[1.1.1]: https://github.com/lumynou5/github-release-action/releases/tag/v1.1.1
3139
[1.1.0]: https://github.com/lumynou5/github-release-action/releases/tag/v1.1.0
3240
[1.0.1]: https://github.com/lumynou5/github-release-action/releases/tag/v1.0.1

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 Lumynous
3+
Copyright (c) 2022-2024 Lumynous
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Lumynous GitHub Release Action
2-
This action creates GitHub releases automatically.
2+
3+
Creates GitHub releases automatically.
34

45
## Usage
56

@@ -24,32 +25,52 @@ jobs:
2425
2526
In this example workflow, it'll create a release whenever push to `main` branch.
2627
The version and the release note will be captured from the changelog following
27-
[Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/).
28-
And a Git tag will be created for the major revision, see [Inputs](#Inputs) for more information.
28+
[Keep a Changelog](https://keepachangelog.com/) and
29+
[Semantic Versioning](https://semver.org/). And a Git tag will be created for
30+
the major revision, see [Inputs](#Inputs) for more information.
31+
32+
This is useful to automatically publish releases on pushing to the stable branch
33+
when using Git flow, etc.
34+
35+
Note that "moving tags" are considered an anti-pattern in Git and should only be
36+
used for GitHub actions. This is due to GitHub actions' lack of semantic
37+
version functionality, which makes developers have to use tags like `v1` to let
38+
GitHub checkout latest version with major version `1` rather than matching a
39+
version pattern like `^1.0.0`. To disable creating and editing moving tags, use
2940

30-
This is useful to automatically publish releases on pushing to the stable branch when using Git flow, etc.
41+
```yml
42+
with:
43+
major-tag-template: ''
44+
minor-tag-template: ''
45+
```
3146

3247
## Inputs
48+
3349
- `token` (required)
3450
The GitHub token.
3551
- `changelog`
3652
The path to the changelog. Default: `CHANGELOG.md`.
3753
- `tag-template`
3854
The template of the Git tag. Default: `v{version}`.
3955
- `major-tag-template`
40-
The template of the Git tag of the major version. Doesn't perform if the major version is 0.
41-
Default: `v{major}`. Empty for no major tag.
56+
The template of the Git tag of the major version. Doesn't perform if the
57+
major version is 0.
58+
Default: `v{major}`. Empty for no major tag.
4259
- `minor-tag-template`
43-
The template of the Git tag of the minor version. Default: `v{maojr}.{minor}`. Empty for no minor tag.
60+
The template of the Git tag of the minor version.
61+
Default: `v{maojr}.{minor}`. Empty for no minor tag.
4462
- `name-template`
45-
The template of the GitHub release. Default: `v{version}`.
63+
The template of the GitHub release.
64+
Default: `v{version}`.
4665
- `is-draft`
47-
If the GitHub release is a draft. Default: `false`.
66+
If the GitHub release is a draft.
67+
Default: `false`.
68+
69+
The following list shows the parameters that can be used in templates. To use
70+
parameters, add a parameter name wrapping with braces to your template, and it
71+
will be replaced with data from your changelog; i.e. `{parameter-name}` will be
72+
replaced with the corresponding value.
4873

49-
The following list shows the parameters that can be used in templates.
50-
To use parameters, add a parameter name wrapping with braces to your template,
51-
and it will be replaced with data from your changelog;
52-
i.e. `{parameter-name}` will be replaced with the corresponding value.
5374
- `version`
5475
The version.
5576
- `major`
@@ -66,7 +87,12 @@ i.e. `{parameter-name}` will be replaced with the corresponding value.
6687
The release date.
6788

6889
## Outputs
69-
The outputs include all the parameters of templates and the following items in addition.
90+
91+
The outputs include all the parameters of templates and the following items in
92+
addition.
93+
94+
- `change`
95+
The changelog of the latest version.
7096
- `tag`
7197
The name of the Git tag.
7298
- `major-tag`
@@ -79,5 +105,6 @@ The outputs include all the parameters of templates and the following items in a
79105
The URL to upload assets for the GitHub release.
80106

81107
## License
108+
82109
The source code is distributed under the MIT license.
83110
See [LICENSE.md](LICENSE.md) for further information.

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ outputs:
4747
description: The build number or an empty string.
4848
release-date:
4949
description: The release date.
50+
change:
51+
description: The changelog of last version.
5052
tag:
5153
description: The name of the Git tag.
5254
major-tag:
5355
description: The name of the Git tag of the major version.
56+
minor-tag:
57+
description: The name of the Git tag of the minor version.
5458
html-url:
5559
description: The URL to the page of the GitHub release.
5660
upload-url:

0 commit comments

Comments
 (0)