Merge pull request #29 from beeyev/filter-list-update/2024-07-13_11-2… #36
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
# Alexander Tebiev - https://github.com/beeyev | |
name: Automated release | |
on: | |
push: | |
branches: [ master ] | |
# pull_request: | |
# branches: [master] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
prepare: | |
name: Check if automated release is needed | |
runs-on: ubuntu-latest | |
outputs: | |
pr_found: ${{ steps.PR.outputs.pr_found == 'true' && contains(steps.PR.outputs.pr_labels, 'filter-list-update') }} | |
pr_body: ${{ steps.PR.outputs.pr_body }} | |
steps: | |
- name: Get current PR | |
uses: 8BitJonny/[email protected] | |
id: PR | |
- name: PR details | |
run: | | |
echo "Is pr found? - ${{ steps.PR.outputs.pr_found }}" | |
echo "PR number is - ${{ steps.PR.outputs.number }}" | |
automated-release: | |
name: Automated release | |
runs-on: ubuntu-latest | |
needs: prepare | |
if: needs.prepare.outputs.pr_found == 'true' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: PR details | |
run: | | |
echo "pr found? - ${{ needs.prepare.outputs.pr_found }}" | |
echo "PR body - ${{ needs.prepare.outputs.pr_body }}" | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create new release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "${{ steps.tag_version.outputs.new_tag }} - (filter list update)" | |
tag_name: ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ needs.prepare.outputs.pr_body }} | |
generate_release_notes: true | |
make_latest: true |