-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from sandialabs/automate-releases
Automate releases
- Loading branch information
Showing
5 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
environment: release | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/python-semantic-release@3ba53469e72452e7597dd5c61851e6fbf294420b # master | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # release/v1 | ||
if: steps.release.outputs.released == 'true' | ||
|
||
- name: Publish to GitHub Releases | ||
uses: python-semantic-release/upload-to-gh-release@fe6cc89b43d8cbf0f9ce3285df3f77ff69c9b5d4 # main | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% for type_, commits in release["elements"] | dictsort %} | ||
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }} | ||
{%- if type_ != "unknown" %} | ||
{% for commit in commits -%} | ||
{%- set summary = commit.message.rstrip().splitlines()[0] -%} | ||
{%- set details = commit.message.rstrip().splitlines()[2:] -%} | ||
* {{ summary }} ([`{{ commit.hexsha[:7] }}`]({{ commit.hexsha | commit_hash_url }})) | ||
{% if details %} | ||
{% for line in details %}{% if line.strip() %} {{ line }}{% endif %} | ||
{% endfor %}{% endif -%} | ||
{% endfor %}{% endif %}{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# CHANGELOG | ||
|
||
|
||
{% for version, release in context.history.released.items() %} | ||
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }}) | ||
{% for type_, commits in release["elements"] | dictsort %} | ||
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }} | ||
{% for commit in commits -%} | ||
{%- set summary = commit.message.rstrip().splitlines()[0] -%} | ||
{%- set details = commit.message.rstrip().splitlines()[2:] -%} | ||
* {{ summary }} ([`{{ commit.hexsha[:7] }}`]({{ commit.hexsha | commit_hash_url }})) | ||
{% if details %} | ||
{% for line in details %}{% if line.strip() %} {{ line }}{% endif %} | ||
{% endfor %}{% endif -%} | ||
{% endfor %}{% endfor %}{% endfor %} |