Skip to content

Merge pull request #278 from staticdev/dependabot/pip/dot-github/work… #339

Merge pull request #278 from staticdev/dependabot/pip/dot-github/work…

Merge pull request #278 from staticdev/dependabot/pip/dot-github/work… #339

Workflow file for this run

---
name: Release
"on":
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
- 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
with:
tag-template: "{VERSION}"
version-command: |
cat current-version.txt
- name: Install Ansible
run: |
pip install --constraint=.github/workflows/constraints.txt ansible
- name: Trigger a new import on Galaxy.
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/[email protected]
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}