Skip to content

Merge pull request #5 from manala/dependabot/github_actions/CumulusDS… #2

Merge pull request #5 from manala/dependabot/github_actions/CumulusDS…

Merge pull request #5 from manala/dependabot/github_actions/CumulusDS… #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-24.04
if: github.event.head_commit.message == 'Release'
steps:
- name: Notify Slack - Starting
uses: act10ns/slack@v2
with:
status: starting
channel: '#collection_release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Checkout
uses: actions/checkout@v4
- name: Set ansible galaxy token
run: |
cat << EOF > ./galaxy_token
token: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
EOF
- name: Set up system
uses: ./.manala/github/system/setup
- name: Get metadata from galaxy.yml
id: metadata
uses: CumulusDS/[email protected]
with:
file: ./galaxy.yml
- name: Build
id: build
run: |
make build VERBOSE=1
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
path: ./manala-path-${{ steps.metadata.outputs.version }}.tar.gz
name: manala-path-${{ steps.metadata.outputs.version }}
retention-days: 1
- name: Publish
id: publish
run: |
make publish VERBOSE=1
- name: Get Changelog entry
id: changelog
uses: mindsers/changelog-reader-action@v2
with:
path: ./CHANGELOG.md
version: ${{ steps.metadata.outputs.version }}
- name: Create GitHub Release
id: release
uses: ncipollo/release-action@v1
with:
name: manala-path ${{ steps.metadata.outputs.version }}
tag: ${{ steps.metadata.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
artifacts: ./manala-path-${{ steps.metadata.outputs.version }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
skipIfReleaseExists: true
- name: Notify Slack - Status
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#collection_release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()