Skip to content

Build release

Build release #57

Workflow file for this run

---
name: Build release
on: # yamllint disable-line rule:truthy
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
name: Build release
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.SAMLTRACER_BUILD_TOKEN }}
ref: ${{ github.head_ref || github.ref_name }}
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Fetch changes
# Without fetching, we might miss new tags due to caching in Github Actions
run: git fetch --all
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install & build assets
run: |
# Make sure the lock-file is up to date before we run clean-install
npm install --package-lock-only
npm clean-install
npm audit fix
- name: Build custom (minimum) release of highlight.js
run: |
cd node_modules/highlight.js
npm install --package-lock-only
npm clean-install
npm run build
node tools/build.js xml properties http
- name: Copy third-party dependencies to lib/ directory
run: |
cp node_modules/highlight.js/build/highlight.min.js lib/highlight.min.js
cp node_modules/pako/dist/pako_inflate.min.js lib/pako_inflate.min.js
- name: Clean release
run: |
grep export-ignore .gitattributes | cut -d ' ' -f 1 | while IFS= read -r line
do
rm -rf "$line"
done
rm -rf .git
- name: Build zip-file
run: |
zip -1 -r /tmp/samltracer.zip *
- name: Save release
uses: actions/upload-artifact@v7
with:
name: release
path: "/tmp/samltracer.zip"
retention-days: 1
- name: Calculate SHA checksum
run: sha256sum "/tmp/samltracer.zip"