Skip to content

🦕 (#88)

🦕 (#88) #22

---
name: Lint Code Base
on:
push:
pull_request:
branches: [main]
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check alphabetical order in file
run: |
cp README.md README.prev.md
make
diff README.prev.md README.md
env:
LANG: de_DE.UTF-8
LC_ALL: de_DE.UTF-8
- name: Lint Code Base
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_NATURAL_LANGUAGE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.x"
- name: Install fortune
if: github.ref == 'refs/heads/main'
run: sudo apt-get install fortune
- name: Run make gen-fortune
if: github.ref == 'refs/heads/main'
run: make gen-fortune
- name: Get Date
if: github.ref == 'refs/heads/main'
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Get Short SHA
if: github.ref == 'refs/heads/main'
id: sha
run: echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
# Create release upon push on main
- name: Create tag
if: github.ref == 'refs/heads/main'
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: v${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}
- name: Create Release
if: github.ref == 'refs/heads/main'
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}
name: v${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}
draft: false
prerelease: false
files: |
output/flachwitze
output/flachwitze.dat