Skip to content

Commit

Permalink
Merge pull request #28 from pollenjp/release/v1.1.2
Browse files Browse the repository at this point in the history
Release/v1.1.2
  • Loading branch information
pollenjp authored Sep 13, 2024
2 parents 040dfad + 4a52871 commit 526dc46
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 23 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/pull_request_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- synchronize
permissions:
contents: read
defaults:
run:
shell: bash -eux -o pipefail -o posix {0}
jobs:
call_autolabel_workflow:
permissions:
Expand All @@ -20,23 +23,22 @@ jobs:
check_release_version:
runs-on: ubuntu-latest
steps:
- name: Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Checkout
# https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Extract package version
id: package_version
# https://github.com/freshautomations/stoml/releases
env:
STOML_VERSION: 0.7.1
run: |
set -eux -o pipefail
wget -O stoml "https://github.com/freshautomations/stoml/releases/download/v${STOML_VERSION}/stoml_linux_amd64"
chmod +x stoml
package_version=$(./stoml pyproject.toml project.version)
package_version=$(
PYTHONPATH='src/ansible_lint_custom_strict_naming' \
python3 -c 'from __about__ import __version__; print(__version__)'
)
echo "package_version=${package_version}" >> $GITHUB_OUTPUT
- name: Check the tag is new and doesn't exist
run: |
set -eux -o pipefail
package_version="${{ steps.package_version.outputs.package_version }}"
if git fetch origin "refs/tags/v${package_version}"; then
echo "${package_version} tag already exists!" >&2
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,31 @@ on:
permissions:
contents: read
env:
UV_VERSION: 0.4.1
UV_VERSION: 0.4.9
defaults:
run:
shell: bash -eux -o pipefail -o posix {0}
jobs:
update_release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Checkout
uses: actions/checkout@v4
- name: Extract package version
id: package_version
# https://github.com/freshautomations/stoml/releases
env:
STOML_VERSION: 0.7.1
run: |
set -eux -o pipefail
wget -O stoml "https://github.com/freshautomations/stoml/releases/download/v${STOML_VERSION}/stoml_linux_amd64"
chmod +x stoml
package_version=$(./stoml pyproject.toml project.version)
echo "PACKAGE_VERSION=${package_version}" >> $GITHUB_OUTPUT
package_version=$(
PYTHONPATH='src/ansible_lint_custom_strict_naming' \
python3 -c 'from __about__ import __version__; print(__version__)'
)
echo "package_version=${package_version}" >> $GITHUB_OUTPUT
- name: Push tag
run: |
set -eux -o pipefail
Expand All @@ -35,7 +40,7 @@ jobs:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
version: ${{ steps.package_version.outputs.PACKAGE_VERSION }}
version: ${{ steps.package_version.outputs.package_version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ on:
permissions:
contents: read
env:
UV_VERSION: 0.4.1
UV_VERSION: 0.4.9
defaults:
run:
shell: bash -eux -o pipefail -o posix {0}
jobs:
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi
release-build:
runs-on: ubuntu-latest
steps:
- name: Instal uv
run: |
set -eux -o pipefail -o posix
curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
echo PATH="${HOME}/.cargo/bin:${PATH}" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "ansible-lint-custom-strict-naming"
version = "1.1.1"
description = "Add your description here"
authors = [{ name = "pollenjp", email = "polleninjp@gmail.com" }]
dependencies = ["ansible-lint>=6.24.0"]
Expand All @@ -11,6 +10,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/pollenjp/ansible-lint-custom-strict-naming"
Expand All @@ -36,8 +36,9 @@ dev-dependencies = ["pyright>=1.1.378", "ruff>=0.6.3"]
"ansible_lint_custom_strict_naming" = "src/ansible_lint_custom_strict_naming"
"ansiblelint.rules.custom.ansible_lint_custom_strict_naming" = "src/rules"

[tool.hatch.metadata]
allow-direct-references = true
[tool.setuptools.dynamic]
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
version = { attr = "ansible_lint_custom_strict_naming.__about__.__version__" }


[tool.ruff]
Expand Down
1 change: 1 addition & 0 deletions src/ansible_lint_custom_strict_naming/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.1.2"

0 comments on commit 526dc46

Please sign in to comment.