Skip to content

Workflow file for this run

name: Release
on:

Check failure on line 3 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
workflow_run:
paths-ignore:
- '*.md'
workflows: [Build & Test]
branches: [main]
types: [completed]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.ref == 'refs/heads/main' || github.event_name == 'schedule' }}
steps:
- name: Download Databases
uses: dawidd6/action-download-artifact@v2
with:
name: build
workflow: build.yml
- name: Set some env variables
run: |
echo "RELEASE_DATE=$(date '+%D %T')" >> ${GITHUB_ENV}
echo "RELEASE_TAG=$(date '+%b.%d.%y.%H.%M.%S')" >> ${GITHUB_ENV}
- name: Create New Release
uses: softprops/action-gh-release@v1
with:
files: |
*.mmdb
name: ${{ env.RELEASE_DATE }}
tag_name: ${{ env.RELEASE_TAG }}
fail_on_unmatched_files: true
body: |
## Built on: ${{ env.RELEASE_DATE }}
Check the project's [readme](https://github.com/HostByBelle/IP-Geolocation-DB#variants) for information about the varients available.
- name: Remove old releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 1
delete_tags: true
delete_expired_data: 7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}