Skip to content

changes to uhgg

changes to uhgg #26

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test and release
on:
push:
branches: [ main ]
tags:
- '[0-9]'
pull_request:
branches: [ main ]
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- image: "ubuntu-latest"
short: "linux"
runs-on: "${{matrix.os.image}}"
steps:
- uses: actions/checkout@v3
- name: Check files
shell: bash -l {0}
run: for x in recipes/*/manifests/*.tsv; do grep -e "genus\sspecies" $x; done
release:
needs: test
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/upload-artifact@v3
with:
name: manifests
path: recipes/*/manifests/*.tsv
- name: Read release notes
id: rns
uses: andstor/file-reader-action@v1
with:
path: "release_notes/${{ github.ref_name }}.txt"
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: "version ${{ github.ref_name }}"
artifacts: "recipes/*/manifests/*.tsv,release_notes/${{ github.ref_name }}.json"
bodyFile: "release_notes/${{ github.ref_name }}.txt"
draft: false
prerelease: false
- name: toot release
uses: rzr/fediverse-action@master
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
message: "New MICOM database release!\n---\n ${{ steps.rns.outputs.contents }}"
host: "mstdn.science"