Skip to content

Merge pull request #40 from ecm-pushbx/ecm-2026-04l #66

Merge pull request #40 from ecm-pushbx/ecm-2026-04l

Merge pull request #40 from ecm-pushbx/ecm-2026-04l #66

Workflow file for this run

name: Build
on:
pull_request:
types:
- opened
- ready_for_review
- reopened
- synchronize
push:
workflow_dispatch:
jobs:
build:
if: contains(github.event.head_commit.message, '[skip ci]') == false
runs-on: ubuntu-24.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v6
with:
submodules: recursive
- name: Package install
run: ./ci_prereq.sh
- name: Build Tools
run: ./ci_build_tools.sh
- name: Build
run: ./ci_build.sh
# - name: Test
# run: ./ci_test.sh
#
- name: Make snapshot name
id: snapshotname
if: github.repository == 'LoopZ/TheList' &&
github.ref_type != 'tag' &&
(github.event_name == 'push' || github.event.pull_request.merged == true)
run: |
(
today=`date -u +%F | tr '\n' '-'`
s_sha=`echo -n ${GITHUB_SHA} | cut -c1-8`
printf "fname=snapshot-%s%s\n" $today $s_sha >> $GITHUB_OUTPUT
)
- name: Upload
if: steps.snapshotname.outputs.fname
uses: actions/upload-artifact@v6
with:
name: ${{ steps.snapshotname.outputs.fname }}
path: TheList
- name: Create release content
id: release
if: github.repository == 'LoopZ/TheList' && github.ref_type == 'tag'
run: |
version="${{ github.ref_type == 'tag' && github.ref_name }}"
release="TheList-${version}"
#
notes="${release}.md"
echo "" >> "$notes"
#
archive="${release}.zip"
zip --recurse-paths "${archive}" TheList
#
echo "version=$version" >>"$GITHUB_OUTPUT"
echo "archive=$archive" >>"$GITHUB_OUTPUT"
echo "notes=$notes" >>"$GITHUB_OUTPUT"
- name: Create release
if: steps.release.outputs.version
run: |
gh release create \
'${{ steps.release.outputs.version }}' \
'${{ steps.release.outputs.archive }}' \
--notes-file '${{ steps.release.outputs.notes }}' \
--target '${{ github.sha }}' \
--verify-tag \
--fail-on-no-commits \
--draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}