Files
2026-10-19 23:10:28 +03:30

100 lines
2.5 KiB
YAML

name: Build & Release
on:
push:
paths-ignore:
- "**/*.md"
- "**/*.txt"
- "LICENSE"
pull_request:
paths-ignore:
- "**/*.md"
- "**/*.txt"
- "LICENSE"
workflow_dispatch:
inputs:
tag:
description: "Release tag (e.g. v1.0.0)"
required: false
default: ""
type: string
prerelease:
description: "Pre-release?"
required: false
default: false
type: boolean
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: checkout sdk
uses: actions/checkout@v4
with:
repository: ps5-payload-dev/sdk
path: ps5-payload-sdk
- name: build sdk
working-directory: ps5-payload-sdk
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
wget build-essential cmake pkg-config \
clang-15 lld-15
make
make DESTDIR=${{ runner.tool_cache }}/ps5-payload-sdk install
echo "PS5_PAYLOAD_SDK=${{ runner.tool_cache }}/ps5-payload-sdk" >> $GITHUB_ENV
- name: build payload
env:
TAG: ${{ github.event.inputs.tag }}
run: |
if [ -n "$TAG" ]; then
make clean all VERSION="$TAG"
else
make clean all
fi
- uses: actions/upload-artifact@v4
with:
name: Browser_appCache_remove
path: Browser_appCache_remove.elf
release:
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: Browser_appCache_remove
- name: tag
env:
TAG: ${{ github.event.inputs.tag }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "$TAG"
git push origin "$TAG"
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: "Browser AppCache Remove ${{ github.event.inputs.tag }}"
prerelease: ${{ github.event.inputs.prerelease }}
generate_release_notes: true
files: Browser_appCache_remove.elf