Test PR 15: this title will display under release notes as uncategorized (no label added) #251
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' # match basic semver tags | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
- 'release-*' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Lint Shell Scripts | |
continue-on-error: true | |
run: | | |
sudo apt-get update | |
sudo apt-get install shellcheck | |
shellcheck **/*.sh | |
- name: Lint PowerShell Scripts | |
continue-on-error: true | |
run: | | |
pwsh -Command "Invoke-ScriptAnalyzer -EnableExit -Recurse -Path ." | |
- name: Lint Lua | |
continue-on-error: true | |
run: | | |
sudo apt-get install -y luarocks | |
sudo luarocks install luacheck | |
luacheck **/*.lua | |
- name: Lint TeX Files | |
continue-on-error: true | |
run: | | |
sudo apt-get install chktex | |
chktex **/*.tex | |
- name: Lint YAML Files | |
continue-on-error: true | |
run: | | |
sudo apt-get update | |
sudo apt-get install yamllint | |
yamllint -f parsable **/*.yml | |
semgrep-scan: | |
runs-on: ubuntu-latest | |
container: | |
image: returntocorp/semgrep:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Semgrep Scan | |
continue-on-error: true | |
run: | | |
semgrep --config "p/r2c" . | |
build-release: | |
if: startsWith(github.head_ref, 'release') | |
#if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [lint, semgrep-scan] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get release version | |
id: version | |
run: | | |
echo "version=${GITHUB_HEAD_REF##*-}" >> $GITHUB_ENV | |
- name: Get current date | |
id: date | |
run: | | |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Build Assets | |
run: git ls-files | zip LME-${{ env.version }}.zip -@ | |
- name: Build Changelog | |
id: release | |
uses: mikepenz/[email protected] | |
with: | |
#fromTag: ${{ github.head_ref }} | |
toTag: ${{ github.head_ref }} # ${{ github.ref }} | |
configuration: "configuration.json" | |
failOnError: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Draft Release | |
uses: softprops/[email protected] | |
with: | |
name: "LME v${{ env.version }}" | |
tag_name: "v${{ env.version }}" | |
append_body: true | |
body: | | |
## [${{ env.version }}] - Timberrrrr! - ${{ env.date }} | |
${{ steps.release.outputs.changelog }} | |
files: LME-${{ env.version }}.zip | |
draft: true | |
prerelease: false | |
discussion_category_name: "Announcements" | |
generate_release_notes: false | |
fail_on_unmatched_files: true | |
token: ${{ secrets.GITHUB_TOKEN }} |