From e9dc40e6f913f9fb87d1dc146972e571c90e5390 Mon Sep 17 00:00:00 2001 From: staticdev Date: Thu, 1 Dec 2022 07:09:55 +0100 Subject: [PATCH] Simplify release workflow --- .github/workflows/constraints.txt | 1 - .github/workflows/release.yml | 13 ++++--------- .github/workflows/tests.yml | 2 ++ current-version.txt | 1 + meta/main.yml | 10 ++++++++++ pyproject.toml | 15 --------------- 6 files changed, 17 insertions(+), 25 deletions(-) create mode 100644 current-version.txt delete mode 100644 pyproject.toml diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index 977a92a..9363f11 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -2,4 +2,3 @@ pip==22.3.1 ansible==7.0.0 yamllint==1.28.0 ansible-lint==6.9.0 -poetry==1.2.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01def4c..cb182a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,18 +19,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: Upgrade pip run: | pip install --constraint=.github/workflows/constraints.txt pip pip --version - - name: Install Poetry - run: | - pip install --constraint=.github/workflows/constraints.txt poetry - poetry --version - - name: Check if there is a parent commit id: check-parent-commit run: | @@ -39,11 +34,11 @@ jobs: - name: Detect and tag new version id: check-version if: steps.check-parent-commit.outputs.sha - uses: salsify/action-detect-and-tag-new-version@v2.0.3 + uses: salsify/action-detect-and-tag-new-version@v2 with: tag-template: "{VERSION}" version-command: | - bash -o pipefail -c "poetry version | awk '{ print \$2 }'" + cat current-version.txt - name: Install Ansible run: | @@ -53,7 +48,7 @@ jobs: run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_TOKEN }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) - name: Publish the release notes - uses: release-drafter/release-drafter@v5.21.1 + uses: release-drafter/release-drafter@v5 with: publish: ${{ steps.check-version.outputs.tag != '' }} tag: ${{ steps.check-version.outputs.tag }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8773985..21ab44b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,6 +45,8 @@ jobs: distro: - debian11 - debian10 + # https://github.com/geerlingguy/docker-ubuntu2204-ansible/issues/6 + # - ubuntu2204 - ubuntu2004 steps: diff --git a/current-version.txt b/current-version.txt new file mode 100644 index 0000000..26aaba0 --- /dev/null +++ b/current-version.txt @@ -0,0 +1 @@ +1.2.0 diff --git a/meta/main.yml b/meta/main.yml index 3af7135..368255e 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -5,8 +5,18 @@ galaxy_info: description: "Create and configure Firefox profiles and download extensions." license: GPLv2 min_ansible_version: "2.11" + platforms: - name: Debian + versions: + - bullseye + - buster + + - name: Ubuntu + versions: + # - jammy + - focal + galaxy_tags: - workstation - system diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index e75b95d..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "ansible-role-firefox" -version = "1.2.0" -description = "Ansible role to configure Firefox." -authors = ["staticdev "] -license = "GPL-2.0-or-later" -readme = "README.rst" - -[tool.poetry.dependencies] - -[tool.poetry.dev-dependencies] - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api"